# Cloud Speech-to-Text v2 API - Class RecognitionConfig (1.8.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.8.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.7.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.6.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.5.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.RecognitionConfig)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.RecognitionConfig)

    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](https://learn.microsoft.com/dotnet/api/system.object) \> RecognitionConfig

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RecognitionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RecognitionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RecognitionConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig), [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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Speech.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2)

## Assembly

Google.Cloud.Speech.V2.dll

## Constructors

### RecognitionConfig()

    public RecognitionConfig()

### RecognitionConfig(RecognitionConfig)

    public RecognitionConfig(RecognitionConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig` |

## Properties

### Adaptation

    public SpeechAdaptation Adaptation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.SpeechAdaptation` |   |

### AutoDecodingConfig

    public AutoDetectDecodingConfig AutoDecodingConfig { get; set; }

Automatically detect decoding parameters.
Preferred for supported formats.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.AutoDetectDecodingConfig` |   |

### DecodingConfigCase

    public RecognitionConfig.DecodingConfigOneofCase DecodingConfigCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionConfig.DecodingConfigOneofCase` |   |

### DenoiserConfig

    public DenoiserConfig DenoiserConfig { get; set; }

Optional. Optional denoiser config. May not be supported for all models
and may have no effect.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.DenoiserConfig` |   |

### ExplicitDecodingConfig

    public ExplicitDecodingConfig ExplicitDecodingConfig { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.ExplicitDecodingConfig` |   |

### Features

    public RecognitionFeatures Features { get; set; }

Speech recognition features to enable.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognitionFeatures` |   |

### LanguageCodes

    public RepeatedField<string> LanguageCodes { get; }

Optional. The language of the supplied audio as a
[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 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](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).

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** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### 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](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
and the models supported in each region can be found in the [Table Of
Supported
Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.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** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.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** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.TranslationConfig` |   |