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, with the latest version being 1.4.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides properties such as \u003ccode\u003eConfidence\u003c/code\u003e, which estimates the likelihood of the recognized words being correct, ranging between 0.0 and 1.0, with 0.0 being the default when not set.\u003c/p\u003e\n"],["\u003cp\u003eIt includes the \u003ccode\u003eTranscript\u003c/code\u003e property, which holds the text representation of the recognized spoken words, enabling access to the recognized speech.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eWords\u003c/code\u003e property provides a detailed list of \u003ccode\u003eWordInfo\u003c/code\u003e objects, offering word-specific information for each recognized word, and includes all words from the start of the audio when speaker diarization is enabled.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSpeechRecognitionAlternative\u003c/code\u003e implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits members from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,["# Cloud Speech-to-Text v2 API - Class SpeechRecognitionAlternative (1.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.SpeechRecognitionAlternative)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.SpeechRecognitionAlternative)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.SpeechRecognitionAlternative)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.SpeechRecognitionAlternative)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.SpeechRecognitionAlternative)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.SpeechRecognitionAlternative) \n\n public sealed class SpeechRecognitionAlternative : IMessage\u003cSpeechRecognitionAlternative\u003e, IEquatable\u003cSpeechRecognitionAlternative\u003e, IDeepCloneable\u003cSpeechRecognitionAlternative\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Speech-to-Text v2 API class SpeechRecognitionAlternative.\n\nAlternative hypotheses (a.k.a. n-best list). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SpeechRecognitionAlternative \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SpeechRecognitionAlternative](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.SpeechRecognitionAlternative), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SpeechRecognitionAlternative](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.SpeechRecognitionAlternative), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SpeechRecognitionAlternative](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.SpeechRecognitionAlternative), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Speech.V2](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Speech.V2.dll\n\nConstructors\n------------\n\n### SpeechRecognitionAlternative()\n\n public SpeechRecognitionAlternative()\n\n### SpeechRecognitionAlternative(SpeechRecognitionAlternative)\n\n public SpeechRecognitionAlternative(SpeechRecognitionAlternative other)\n\nProperties\n----------\n\n### Confidence\n\n public float Confidence { get; set; }\n\nThe confidence estimate between 0.0 and 1.0. A higher number\nindicates an estimated greater likelihood that the recognized words are\ncorrect. This field is set only for the top alternative of a non-streaming\nresult or, of a streaming result where\n\\[is_final\\]\\[google.cloud.speech.v2.StreamingRecognitionResult.is_final\\] is\nset to `true`. This field is not guaranteed to be accurate and users should\nnot rely on it to be always provided. The default of 0.0 is a sentinel\nvalue indicating `confidence` was not set.\n\n### Transcript\n\n public string Transcript { get; set; }\n\nTranscript text representing the words that the user spoke.\n\n### Words\n\n public RepeatedField\u003cWordInfo\u003e Words { get; }\n\nA list of word-specific information for each recognized word.\nWhen the\n\\[SpeakerDiarizationConfig\\]\\[google.cloud.speech.v2.SpeakerDiarizationConfig\\]\nis set, you will see all the words from the beginning of the audio."]]