# Cloud Speech-to-Text v2 API - Class Recognizer (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.Recognizer)
- [1.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.7.0/Google.Cloud.Speech.V2.Recognizer)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.6.0/Google.Cloud.Speech.V2.Recognizer)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.5.0/Google.Cloud.Speech.V2.Recognizer)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.4.0/Google.Cloud.Speech.V2.Recognizer)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.3.0/Google.Cloud.Speech.V2.Recognizer)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.2.0/Google.Cloud.Speech.V2.Recognizer)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.1.0/Google.Cloud.Speech.V2.Recognizer)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/1.0.0/Google.Cloud.Speech.V2.Recognizer)

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

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

A Recognizer message. Stores recognition configuration and metadata.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Recognizer

## Implements

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

### Recognizer()

    public Recognizer()

### Recognizer(Recognizer)

    public Recognizer(Recognizer other)

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

## Properties

### Annotations

    public MapField<string, string> Annotations { get; }

Allows users to store small amounts of arbitrary data.
Both the key and the value must be 63 characters or less each.
At most 100 annotations.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. Creation time.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### DefaultRecognitionConfig

    public RecognitionConfig DefaultRecognitionConfig { get; set; }

Default configuration to use for requests with this Recognizer.
This can be overwritten by inline configuration in the
\[RecognizeRequest.config\]\[google.cloud.speech.v2.RecognizeRequest.config\]
field.

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

### DeleteTime

    public Timestamp DeleteTime { get; set; }

Output only. The time at which this Recognizer was requested for deletion.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### DisplayName

    public string DisplayName { get; set; }

User-settable, human-readable name for the Recognizer. Must be 63
characters or less.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Etag

    public string Etag { get; set; }

Output only. This checksum is computed by the server based on the value of
other fields. This may be sent on update, undelete, and delete requests to
ensure the client has an up-to-date value before proceeding.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ExpireTime

    public Timestamp ExpireTime { get; set; }

Output only. The time at which this Recognizer will be purged.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### KmsKeyName

    public string KmsKeyName { get; set; }

Output only. The [KMS key
name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
the Recognizer is encrypted. The expected format is
`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyNameAsCryptoKeyName

    public CryptoKeyName KmsKeyNameAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.CryptoKeyName)-typed view over the [KmsKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizer#Google_Cloud_Speech_V2_Recognizer_KmsKeyName) resource name property.

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

### KmsKeyVersionName

    public string KmsKeyVersionName { get; set; }

Output only. The [KMS key version
name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
with which the Recognizer is encrypted. The expected format is
`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyVersionNameAsCryptoKeyVersionName

    public CryptoKeyVersionName KmsKeyVersionNameAsCryptoKeyVersionName { get; set; }

[CryptoKeyVersionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.CryptoKeyVersionName)-typed view over the [KmsKeyVersionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizer#Google_Cloud_Speech_V2_Recognizer_KmsKeyVersionName) resource name
property.

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

### LanguageCodes

    [Obsolete]
    public RepeatedField<string> LanguageCodes { get; }

Optional. This field is now deprecated. Prefer the
\[`language_codes`\]\[google.cloud.speech.v2.RecognitionConfig.language_codes\]
field in the
\[`RecognitionConfig`\]\[google.cloud.speech.v2.RecognitionConfig\] message.

The language of the supplied audio as a
[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.

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.
When you create or update a Recognizer, these values are
stored in normalized BCP-47 form. For example, "en-us" is stored as
"en-US".

| **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

    [Obsolete]
    public string Model { get; set; }

Optional. This field is now deprecated. Prefer the
\[`model`\]\[google.cloud.speech.v2.RecognitionConfig.model\] field in the
\[`RecognitionConfig`\]\[google.cloud.speech.v2.RecognitionConfig\] message.

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` |   |

### Name

    public string Name { get; set; }

Output only. Identifier. The resource name of the Recognizer.
Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RecognizerName

    public RecognizerName RecognizerName { get; set; }

[RecognizerName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.RecognizerName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizer#Google_Cloud_Speech_V2_Recognizer_Name) resource name property.

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

### Reconciling

    public bool Reconciling { get; set; }

Output only. Whether or not this Recognizer is in the process of being
updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### State

    public Recognizer.Types.State State { get; set; }

Output only. The Recognizer lifecycle state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizerhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizer.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Speech.V2/latest/Google.Cloud.Speech.V2.Recognizer.Types.State` |   |

### Uid

    public string Uid { get; set; }

Output only. System-assigned unique identifier for the Recognizer.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The most recent time this Recognizer was modified.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |