Share via


TranscribedPhrase Class

  • java.lang.Object
    • com.azure.ai.speech.transcription.models.TranscribedPhrase

Implements

public final class TranscribedPhrase
implements JsonSerializable<TranscribedPhrase>

A transcribed phrase.

Method Summary

Modifier and Type Method and Description
static TranscribedPhrase fromJson(JsonReader jsonReader)

Reads an instance of TranscribedPhrase from the JsonReader.

Integer getChannel()

Get the channel property: The 0-based channel index.

double getConfidence()

Get the confidence property: The confidence value for the phrase.

Duration getDuration()

Get the duration property: The duration in milliseconds.

String getLocale()

Get the locale property: The locale of the phrase.

int getOffset()

Get the offset property: The start offset of the phrase in milliseconds.

Integer getSpeaker()

Get the speaker property: A unique integer number that is assigned to each speaker detected in the audio without particular order.

String getText()

Get the text property: The transcribed text of the phrase.

List<TranscribedWord> getWords()

Get the words property: The words that make up the phrase.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static TranscribedPhrase fromJson(JsonReader jsonReader)

Reads an instance of TranscribedPhrase from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TranscribedPhrase if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getChannel

public Integer getChannel()

Get the channel property: The 0-based channel index. Only present if channel separation is enabled.

Returns:

the channel value.

getConfidence

public double getConfidence()

Get the confidence property: The confidence value for the phrase.

Returns:

the confidence value.

getDuration

public Duration getDuration()

Get the duration property: The duration in milliseconds.

Returns:

the duration value as Duration.

getLocale

public String getLocale()

Get the locale property: The locale of the phrase.

Returns:

the locale value.

getOffset

public int getOffset()

Get the offset property: The start offset of the phrase in milliseconds.

Returns:

the offset value.

getSpeaker

public Integer getSpeaker()

Get the speaker property: A unique integer number that is assigned to each speaker detected in the audio without particular order. Only present if speaker diarization is enabled.

Returns:

the speaker value.

getText

public String getText()

Get the text property: The transcribed text of the phrase.

Returns:

the text value.

getWords

public List<TranscribedWord> getWords()

Get the words property: The words that make up the phrase. Only present if word-level timestamps are enabled.

Returns:

the words value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to