public class SpeechRecognitionAlternative
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Field and Description |
---|---|
protected java.lang.Double |
confidence |
protected java.util.List<SpeechTimestamp> |
timestamps |
protected java.lang.String |
transcript |
protected java.util.List<SpeechWordConfidence> |
wordConfidence |
Constructor and Description |
---|
SpeechRecognitionAlternative() |
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
getConfidence()
Gets the confidence.
|
java.util.List<SpeechTimestamp> |
getTimestamps()
Gets the timestamps.
|
java.lang.String |
getTranscript()
Gets the transcript.
|
java.util.List<SpeechWordConfidence> |
getWordConfidence()
Gets the wordConfidence.
|
protected java.lang.String transcript
protected java.lang.Double confidence
protected java.util.List<SpeechTimestamp> timestamps
@SerializedName(value="word_confidence") protected java.util.List<SpeechWordConfidence> wordConfidence
public java.lang.String getTranscript()
A transcription of the audio.
public java.lang.Double getConfidence()
A score that indicates the service's confidence in the transcript in the range of 0.0 to 1.0. A confidence score is returned only for the best alternative and only with results marked as final.
public java.util.List<SpeechTimestamp> getTimestamps()
Time alignments for each word from the transcript as a list of lists. Each inner list consists of three elements: the word followed by its start and end time in seconds, for example: `[["hello",0.0,1.2],["world",1.2,2.5]]`. Timestamps are returned only for the best alternative.
public java.util.List<SpeechWordConfidence> getWordConfidence()
A confidence score for each word of the transcript as a list of lists. Each inner list consists of two elements: the word and its confidence score in the range of 0.0 to 1.0, for example: `[["hello",0.95],["world",0.866]]`. Confidence scores are returned only for the best alternative and only with results marked as final.