Class AudioTranscriptionWord

java.lang.Object
com.azure.ai.openai.models.AudioTranscriptionWord
All Implemented Interfaces:
com.azure.json.JsonSerializable<AudioTranscriptionWord>

public final class AudioTranscriptionWord extends Object implements com.azure.json.JsonSerializable<AudioTranscriptionWord>
Extended information about a single transcribed word, as provided on responses when the 'word' timestamp granularity is provided.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of AudioTranscriptionWord from the JsonReader.
    Get the end property: The end time of the word relative to the beginning of the audio, expressed in seconds.
    Get the start property: The start time of the word relative to the beginning of the audio, expressed in seconds.
    Get the word property: The textual content of the word.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getWord

      public String getWord()
      Get the word property: The textual content of the word.
      Returns:
      the word value.
    • getStart

      public Duration getStart()
      Get the start property: The start time of the word relative to the beginning of the audio, expressed in seconds.
      Returns:
      the start value.
    • getEnd

      public Duration getEnd()
      Get the end property: The end time of the word relative to the beginning of the audio, expressed in seconds.
      Returns:
      the end value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<AudioTranscriptionWord>
      Throws:
      IOException
    • fromJson

      public static AudioTranscriptionWord fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AudioTranscriptionWord from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AudioTranscriptionWord if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the AudioTranscriptionWord.