public sealed class SpeechRecognitionAlternative : IMessage<SpeechRecognitionAlternative>, IEquatable<SpeechRecognitionAlternative>, IDeepCloneable<SpeechRecognitionAlternative>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Speech-to-Text v2 API class SpeechRecognitionAlternative.
The confidence estimate between 0.0 and 1.0. A higher number
indicates an estimated greater likelihood that the recognized words are
correct. This field is set only for the top alternative of a non-streaming
result or, of a streaming result where
[is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
set to true. This field is not guaranteed to be accurate and users should
not rely on it to be always provided. The default of 0.0 is a sentinel
value indicating confidence was not set.
A list of word-specific information for each recognized word.
When the
[SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
is set, you will see all the words from the beginning of the audio.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSpeechRecognitionAlternative\u003c/code\u003e class in the Cloud Speech-to-Text v2 API represents alternative hypotheses (n-best list) of speech recognition results.\u003c/p\u003e\n"],["\u003cp\u003eThis class, part of the \u003ccode\u003eGoogle.Cloud.Speech.V2\u003c/code\u003e namespace, provides properties for \u003ccode\u003eConfidence\u003c/code\u003e, \u003ccode\u003eTranscript\u003c/code\u003e, and \u003ccode\u003eWords\u003c/code\u003e, detailing the likelihood, text, and word-specific information of each recognized hypothesis.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSpeechRecognitionAlternative\u003c/code\u003e class is part of version 1.0.0 of the API, but there are also version 1.1.0, 1.2.0, 1.3.0, and 1.4.0 (latest) of the documentation.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements the \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces, and has 2 constructors: one empty and one that takes in a \u003ccode\u003eSpeechRecognitionAlternative\u003c/code\u003e as a parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe class' \u003ccode\u003eWords\u003c/code\u003e property will show all words from the beginning of the audio when \u003ccode\u003eSpeakerDiarizationConfig\u003c/code\u003e is set, and the \u003ccode\u003eConfidence\u003c/code\u003e property can show the likelihood of the recognized words.\u003c/p\u003e\n"]]],[],null,[]]