public sealed class ExplicitDecodingConfig : IMessage<ExplicitDecodingConfig>, IEquatable<ExplicitDecodingConfig>, IDeepCloneable<ExplicitDecodingConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Speech-to-Text v2 API class ExplicitDecodingConfig.
Optional. Number of channels present in the audio data sent for
recognition. Note that this field is marked as OPTIONAL for backward
compatibility reasons. It is (and has always been) effectively REQUIRED.
Optional. Sample rate in Hertz of the audio data sent for recognition.
Valid values are: 8000-48000, and 16000 is optimal. For best results, set
the sampling rate of the audio source to 16000 Hz. If that's not possible,
use the native sample rate of the audio source (instead of resampling).
Note that this field is marked as OPTIONAL for backward compatibility
reasons. It is (and has always been) effectively REQUIRED.
[[["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\u003eExplicitDecodingConfig\u003c/code\u003e class in the Google Cloud Speech-to-Text v2 API allows for explicitly specifying audio decoding parameters for speech recognition.\u003c/p\u003e\n"],["\u003cp\u003eThis class 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 from the \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExplicitDecodingConfig\u003c/code\u003e class offers properties such as \u003ccode\u003eAudioChannelCount\u003c/code\u003e, \u003ccode\u003eEncoding\u003c/code\u003e, and \u003ccode\u003eSampleRateHertz\u003c/code\u003e to configure audio data processing.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAudioChannelCount\u003c/code\u003e and \u003ccode\u003eSampleRateHertz\u003c/code\u003e properties are technically optional for backward compatibility but should be set, with a maximum of 8 channels allowed and a sample rate between 8000 and 48000 Hz.\u003c/p\u003e\n"],["\u003cp\u003eThere are 5 versions available of this specific class, with the latest being version 1.4.0.\u003c/p\u003e\n"]]],[],null,["# Cloud Speech-to-Text v2 API - Class ExplicitDecodingConfig (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.ExplicitDecodingConfig)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.ExplicitDecodingConfig)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.ExplicitDecodingConfig)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.ExplicitDecodingConfig)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.ExplicitDecodingConfig)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.ExplicitDecodingConfig) \n\n public sealed class ExplicitDecodingConfig : IMessage\u003cExplicitDecodingConfig\u003e, IEquatable\u003cExplicitDecodingConfig\u003e, IDeepCloneable\u003cExplicitDecodingConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Speech-to-Text v2 API class ExplicitDecodingConfig.\n\nExplicitly specified decoding parameters. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ExplicitDecodingConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ExplicitDecodingConfig](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.ExplicitDecodingConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ExplicitDecodingConfig](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.ExplicitDecodingConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ExplicitDecodingConfig](/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.ExplicitDecodingConfig), [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### ExplicitDecodingConfig()\n\n public ExplicitDecodingConfig()\n\n### ExplicitDecodingConfig(ExplicitDecodingConfig)\n\n public ExplicitDecodingConfig(ExplicitDecodingConfig other)\n\nProperties\n----------\n\n### AudioChannelCount\n\n public int AudioChannelCount { get; set; }\n\nOptional. Number of channels present in the audio data sent for\nrecognition. Note that this field is marked as OPTIONAL for backward\ncompatibility reasons. It is (and has always been) effectively REQUIRED.\n\nThe maximum allowed value is 8.\n\n### Encoding\n\n public ExplicitDecodingConfig.Types.AudioEncoding Encoding { get; set; }\n\nRequired. Encoding of the audio data sent for recognition.\n\n### SampleRateHertz\n\n public int SampleRateHertz { get; set; }\n\nOptional. Sample rate in Hertz of the audio data sent for recognition.\nValid values are: 8000-48000, and 16000 is optimal. For best results, set\nthe sampling rate of the audio source to 16000 Hz. If that's not possible,\nuse the native sample rate of the audio source (instead of resampling).\nNote that this field is marked as OPTIONAL for backward compatibility\nreasons. It is (and has always been) effectively REQUIRED."]]