TranscribedWord Class

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

Implements

public final class TranscribedWord
implements JsonSerializable<TranscribedWord>

Time-stamped word in the display form.

Method Summary

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

Reads an instance of TranscribedWord from the JsonReader.

Duration getDuration()

Get the duration property: The duration in milliseconds.

Duration getOffset()

Get the offset property: The start offset of the word.

String getText()

Get the text property: The recognized word, including punctuation.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static TranscribedWord fromJson(JsonReader jsonReader)

Reads an instance of TranscribedWord from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TranscribedWord 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.

getDuration

public Duration getDuration()

Get the duration property: The duration in milliseconds.

Returns:

the duration value as Duration.

getOffset

public Duration getOffset()

Get the offset property: The start offset of the word.

Returns:

the offset value as Duration.

getText

public String getText()

Get the text property: The recognized word, including punctuation.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to