Package com.azure.ai.openai.models
Class AudioTranscriptionSegment
java.lang.Object
com.azure.ai.openai.models.AudioTranscriptionSegment
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AudioTranscriptionSegment>
public final class AudioTranscriptionSegment
extends Object
implements com.azure.json.JsonSerializable<AudioTranscriptionSegment>
Extended information about a single segment of transcribed audio data.
Segments generally represent roughly 5-10 seconds of speech. Segment boundaries typically occur between words but not
necessarily sentences.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AudioTranscriptionSegmentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AudioTranscriptionSegment from the JsonReader.doubleGet the avgLogprob property: The average log probability associated with this audio segment.doubleGet the compressionRatio property: The compression ratio of this audio segment.getEnd()Get the end property: The time at which this segment ended relative to the beginning of the transcribed audio.intgetId()Get the id property: The 0-based index of this segment within a transcription.doubleGet the noSpeechProb property: The probability of no speech detection within this audio segment.intgetSeek()Get the seek property: The seek position associated with the processing of this audio segment.getStart()Get the start property: The time at which this segment started relative to the beginning of the transcribed audio.doubleGet the temperature property: The temperature score associated with this audio segment.getText()Get the text property: The transcribed text that was part of this audio segment.Get the tokens property: The token IDs matching the transcribed text in this audio segment.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter)
-
Method Details
-
getId
public int getId()Get the id property: The 0-based index of this segment within a transcription.- Returns:
- the id value.
-
getStart
Get the start property: The time at which this segment started relative to the beginning of the transcribed audio.- Returns:
- the start value.
-
getEnd
Get the end property: The time at which this segment ended relative to the beginning of the transcribed audio.- Returns:
- the end value.
-
getText
Get the text property: The transcribed text that was part of this audio segment.- Returns:
- the text value.
-
getTemperature
public double getTemperature()Get the temperature property: The temperature score associated with this audio segment.- Returns:
- the temperature value.
-
getAvgLogprob
public double getAvgLogprob()Get the avgLogprob property: The average log probability associated with this audio segment.- Returns:
- the avgLogprob value.
-
getCompressionRatio
public double getCompressionRatio()Get the compressionRatio property: The compression ratio of this audio segment.- Returns:
- the compressionRatio value.
-
getNoSpeechProb
public double getNoSpeechProb()Get the noSpeechProb property: The probability of no speech detection within this audio segment.- Returns:
- the noSpeechProb value.
-
getTokens
Get the tokens property: The token IDs matching the transcribed text in this audio segment.- Returns:
- the tokens value.
-
getSeek
public int getSeek()Get the seek property: The seek position associated with the processing of this audio segment. Seek positions are expressed as hundredths of seconds. The model may process several segments from a single seek position, so while the seek position will never represent a later time than the segment's start, the segment's start may represent a significantly later time than the segment's associated seek position.- Returns:
- the seek value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AudioTranscriptionSegment>- Throws:
IOException
-
fromJson
public static AudioTranscriptionSegment fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AudioTranscriptionSegment from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AudioTranscriptionSegment 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 AudioTranscriptionSegment.
-