public sealed class RecognitionFeatures : IMessage<RecognitionFeatures>, IEquatable<RecognitionFeatures>, IDeepCloneable<RecognitionFeatures>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Speech-to-Text v2 API class RecognitionFeatures.
public SpeakerDiarizationConfig DiarizationConfig { get; set; }
Configuration to enable speaker diarization and set additional
parameters to make diarization better suited for your application.
When this is enabled, we send all the words from the beginning of the
audio for the top alternative in every consecutive STREAMING responses.
This is done in order to improve our speaker tags as our models learn to
identify the speakers in the conversation over time.
For non-streaming requests, the diarization results will be provided only
in the top alternative of the FINAL SpeechRecognitionResult.
public bool EnableAutomaticPunctuation { get; set; }
If true, adds punctuation to recognition result hypotheses. This feature
is only available in select languages. The default false value does not
add punctuation to result hypotheses.
The spoken emoji behavior for the call. If true, adds spoken emoji
formatting for the request. This will replace spoken emojis with the
corresponding Unicode symbols in the final transcript. If false, spoken
emojis are not replaced.
The spoken punctuation behavior for the call. If true, replaces spoken
punctuation with the corresponding symbols in the request. For example,
"how are you question mark" becomes "how are you?". See
https://cloud.google.com/speech-to-text/docs/spoken-punctuation for
support. If false, spoken punctuation is not replaced.
If true, the top result includes a list of words and the confidence for
those words. If false, no word-level confidence information is returned.
The default is false.
If true, the top result includes a list of words and the start and end
time offsets (timestamps) for those words. If false, no word-level time
offset information is returned. The default is false.
Maximum number of recognition hypotheses to be returned.
The server may return fewer than max_alternatives.
Valid values are 0-30. A value of 0 or 1 will return a maximum of
one. If omitted, will return a maximum of one.
If set to true, the server will attempt to filter out profanities,
replacing all but the initial character in each filtered word with
asterisks, for instance, "f***". If set to false or omitted, profanities
won't be filtered out.
[[["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\u003eThis documentation details the \u003ccode\u003eRecognitionFeatures\u003c/code\u003e class within the Google Cloud Speech-to-Text v2 API for .NET, outlining its available versions and functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRecognitionFeatures\u003c/code\u003e class allows users to configure speech recognition settings, such as enabling speaker diarization, automatic punctuation, spoken emojis, and spoken punctuation.\u003c/p\u003e\n"],["\u003cp\u003eUsers can adjust the output of the API using properties to include word-level confidence, time offsets, the maximum number of alternative transcripts, multi-channel mode, and profanity filtering.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API documented is 1.4.0, and documentation for versions 1.0.0 through 1.3.0 are also available for reference and use.\u003c/p\u003e\n"]]],[],null,["# Cloud Speech-to-Text v2 API - Class RecognitionFeatures (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.RecognitionFeatures)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.RecognitionFeatures)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.RecognitionFeatures)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.RecognitionFeatures)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.RecognitionFeatures)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.RecognitionFeatures) \n\n public sealed class RecognitionFeatures : IMessage\u003cRecognitionFeatures\u003e, IEquatable\u003cRecognitionFeatures\u003e, IDeepCloneable\u003cRecognitionFeatures\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Speech-to-Text v2 API class RecognitionFeatures.\n\nAvailable recognition features. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RecognitionFeatures \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RecognitionFeatures](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionFeatures), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RecognitionFeatures](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionFeatures), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RecognitionFeatures](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionFeatures), [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### RecognitionFeatures()\n\n public RecognitionFeatures()\n\n### RecognitionFeatures(RecognitionFeatures)\n\n public RecognitionFeatures(RecognitionFeatures other)\n\nProperties\n----------\n\n### DiarizationConfig\n\n public SpeakerDiarizationConfig DiarizationConfig { get; set; }\n\nConfiguration to enable speaker diarization and set additional\nparameters to make diarization better suited for your application.\nWhen this is enabled, we send all the words from the beginning of the\naudio for the top alternative in every consecutive STREAMING responses.\nThis is done in order to improve our speaker tags as our models learn to\nidentify the speakers in the conversation over time.\nFor non-streaming requests, the diarization results will be provided only\nin the top alternative of the FINAL SpeechRecognitionResult.\n\n### EnableAutomaticPunctuation\n\n public bool EnableAutomaticPunctuation { get; set; }\n\nIf `true`, adds punctuation to recognition result hypotheses. This feature\nis only available in select languages. The default `false` value does not\nadd punctuation to result hypotheses.\n\n### EnableSpokenEmojis\n\n public bool EnableSpokenEmojis { get; set; }\n\nThe spoken emoji behavior for the call. If `true`, adds spoken emoji\nformatting for the request. This will replace spoken emojis with the\ncorresponding Unicode symbols in the final transcript. If `false`, spoken\nemojis are not replaced.\n\n### EnableSpokenPunctuation\n\n public bool EnableSpokenPunctuation { get; set; }\n\nThe spoken punctuation behavior for the call. If `true`, replaces spoken\npunctuation with the corresponding symbols in the request. For example,\n\"how are you question mark\" becomes \"how are you?\". See\n\u003chttps://cloud.google.com/speech-to-text/docs/spoken-punctuation\u003e for\nsupport. If `false`, spoken punctuation is not replaced.\n\n### EnableWordConfidence\n\n public bool EnableWordConfidence { get; set; }\n\nIf `true`, the top result includes a list of words and the confidence for\nthose words. If `false`, no word-level confidence information is returned.\nThe default is `false`.\n\n### EnableWordTimeOffsets\n\n public bool EnableWordTimeOffsets { get; set; }\n\nIf `true`, the top result includes a list of words and the start and end\ntime offsets (timestamps) for those words. If `false`, no word-level time\noffset information is returned. The default is `false`.\n\n### MaxAlternatives\n\n public int MaxAlternatives { get; set; }\n\nMaximum number of recognition hypotheses to be returned.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.\n\n### MultiChannelMode\n\n public RecognitionFeatures.Types.MultiChannelMode MultiChannelMode { get; set; }\n\nMode for recognizing multi-channel audio.\n\n### ProfanityFilter\n\n public bool ProfanityFilter { get; set; }\n\nIf set to `true`, the server will attempt to filter out profanities,\nreplacing all but the initial character in each filtered word with\nasterisks, for instance, \"f\\*\\*\\*\". If set to `false` or omitted, profanities\nwon't be filtered out."]]