# Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::Recognizer (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::Recognizer.

A Recognizer message. Stores recognition configuration and metadata.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #annotations

    def annotations() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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.

### #annotations=

    def annotations=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- 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.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- 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.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Timestamp)) --- Output only. Creation time.

### #default_recognition_config

    def default_recognition_config() -> ::Google::Cloud::Speech::V2::RecognitionConfig

**Returns**

- ([::Google::Cloud::Speech::V2::RecognitionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig)) --- Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the [RecognizeRequest.config](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognizeRequest#Google__Cloud__Speech__V2__RecognizeRequest_config_instance_ "Google::Cloud::Speech::V2::RecognizeRequest#config (method)") field.

### #default_recognition_config=

    def default_recognition_config=(value) -> ::Google::Cloud::Speech::V2::RecognitionConfig

**Parameter**

- **value** ([::Google::Cloud::Speech::V2::RecognitionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig)) --- Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the [RecognizeRequest.config](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognizeRequest#Google__Cloud__Speech__V2__RecognizeRequest_config_instance_ "Google::Cloud::Speech::V2::RecognizeRequest#config (method)") field.
**Returns**

- ([::Google::Cloud::Speech::V2::RecognitionConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig)) --- Default configuration to use for requests with this Recognizer. This can be overwritten by inline configuration in the [RecognizeRequest.config](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognizeRequest#Google__Cloud__Speech__V2__RecognizeRequest_config_instance_ "Google::Cloud::Speech::V2::RecognizeRequest#config (method)") field.

### #delete_time

    def delete_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which this Recognizer was requested for deletion.

### #display_name

    def display_name() -> ::String

**Returns**

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

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- User-settable, human-readable name for the Recognizer. Must be 63 characters or less.
**Returns**

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

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- 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.

### #expire_time

    def expire_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which this Recognizer will be purged.

### #kms_key_name

    def kms_key_name() -> ::String

**Returns**

- (::String) --- 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}`.

### #kms_key_version_name

    def kms_key_version_name() -> ::String

**Returns**

- (::String) --- 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}`.

### #language_codes

    def language_codes() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. This field is now deprecated. Prefer the [`language_codes`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_language_codes_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#language_codes (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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".

### #language_codes=

    def language_codes=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. This field is now deprecated. Prefer the [`language_codes`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_language_codes_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#language_codes (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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".
**Returns**

- (::Array\<::String\>) --- Optional. This field is now deprecated. Prefer the [`language_codes`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_language_codes_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#language_codes (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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".

### #model

    def model() -> ::String

**Returns**

- (::String) --- Optional. This field is now deprecated. Prefer the [`model`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_model_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#model (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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).

### #model=

    def model=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. This field is now deprecated. Prefer the [`model`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_model_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#model (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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).
**Returns**

- (::String) --- Optional. This field is now deprecated. Prefer the [`model`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig#Google__Cloud__Speech__V2__RecognitionConfig_model_instance_ "Google::Cloud::Speech::V2::RecognitionConfig#model (method)") field in the [`RecognitionConfig`](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-RecognitionConfig "Google::Cloud::Speech::V2::RecognitionConfig (class)") 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).

### #name

    def name() -> ::String

**Returns**

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

### #reconciling

    def reconciling() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. Whether or not this Recognizer is in the process of being updated.

### #state

    def state() -> ::Google::Cloud::Speech::V2::Recognizer::State

**Returns**

- ([::Google::Cloud::Speech::V2::Recognizer::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-Recognizer-State)) --- Output only. The Recognizer lifecycle state.

### #uid

    def uid() -> ::String

**Returns**

- (::String) --- Output only. System-assigned unique identifier for the Recognizer.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Protobuf-Timestamp)) --- Output only. The most recent time this Recognizer was modified.