Cloud Speech-to-Text v2 API - Class RecognitionConfig (1.0.0-beta09)

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
NameDescription
otherRecognitionConfig

Properties

Adaptation

public SpeechAdaptation Adaptation { get; set; }

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

Property Value
TypeDescription
SpeechAdaptation

AutoDecodingConfig

public AutoDetectDecodingConfig AutoDecodingConfig { get; set; }

Automatically detect decoding parameters. Preferred for supported formats.

Property Value
TypeDescription
AutoDetectDecodingConfig

DecodingConfigCase

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

ExplicitDecodingConfig

public ExplicitDecodingConfig ExplicitDecodingConfig { get; set; }

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

Property Value
TypeDescription
ExplicitDecodingConfig

Features

public RecognitionFeatures Features { get; set; }

Speech recognition features to enable.

Property Value
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TranscriptNormalization