Cloud Speech-to-Text v2 API - Class RecognitionConfig (1.1.0)

public sealed class RecognitionConfig : IMessage<RecognitionConfig>, IEquatable<RecognitionConfig>, IDeepCloneable<RecognitionConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Speech-to-Text v2 API class RecognitionConfig.

Provides information to the Recognizer that specifies how to process the recognition request.

Inheritance

object > RecognitionConfig

Namespace

Google.Cloud.Speech.V2

Assembly

Google.Cloud.Speech.V2.dll

Constructors

RecognitionConfig()

public RecognitionConfig()

RecognitionConfig(RecognitionConfig)

public RecognitionConfig(RecognitionConfig other)
Parameter
Name Description
other RecognitionConfig

Properties

Adaptation

public SpeechAdaptation Adaptation { get; set; }

Speech adaptation context that weights recognizer predictions for specific words and phrases.

Property Value
Type Description
SpeechAdaptation

AutoDecodingConfig

public AutoDetectDecodingConfig AutoDecodingConfig { get; set; }

Automatically detect decoding parameters. Preferred for supported formats.

Property Value
Type Description
AutoDetectDecodingConfig

DecodingConfigCase

public RecognitionConfig.DecodingConfigOneofCase DecodingConfigCase { get; }
Property Value
Type Description
RecognitionConfigDecodingConfigOneofCase

ExplicitDecodingConfig

public ExplicitDecodingConfig ExplicitDecodingConfig { get; set; }

Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).

Property Value
Type Description
ExplicitDecodingConfig

Features

public RecognitionFeatures Features { get; set; }

Speech recognition features to enable.

Property Value
Type Description
RecognitionFeatures

LanguageCodes

public RepeatedField<string> LanguageCodes { get; }

Optional. The language of the supplied audio as a BCP-47 language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US".

Supported languages for each model are listed in the Table of Supported Models.

If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.

Property Value
Type Description
RepeatedFieldstring

Model

public string Model { get; set; }

Optional. Which model to use for recognition requests. Select the model best suited to your domain to get best results.

Guidance for choosing which model to use can be found in the Transcription Models Documentation and the models supported in each region can be found in the Table Of Supported Models.

Property Value
Type Description
string

TranscriptNormalization

public TranscriptNormalization TranscriptNormalization { get; set; }

Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.

Property Value
Type Description
TranscriptNormalization

TranslationConfig

public TranslationConfig TranslationConfig { get; set; }

Optional. Optional configuration used to automatically run translation on the given audio to the desired language for supported models.

Property Value
Type Description
TranslationConfig