Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::RecognitionConfig (v0.15.0)

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

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

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#adaptation

defadaptation()->::Google::Cloud::Speech::V2::SpeechAdaptation
Returns

#adaptation=

defadaptation=(value)->::Google::Cloud::Speech::V2::SpeechAdaptation
Parameter
Returns

#auto_decoding_config

defauto_decoding_config()->::Google::Cloud::Speech::V2::AutoDetectDecodingConfig
Returns

#auto_decoding_config=

defauto_decoding_config=(value)->::Google::Cloud::Speech::V2::AutoDetectDecodingConfig
Parameter
Returns

#explicit_decoding_config

defexplicit_decoding_config()->::Google::Cloud::Speech::V2::ExplicitDecodingConfig
Returns

#explicit_decoding_config=

defexplicit_decoding_config=(value)->::Google::Cloud::Speech::V2::ExplicitDecodingConfig
Parameter
Returns

#features

deffeatures()->::Google::Cloud::Speech::V2::RecognitionFeatures
Returns

#features=

deffeatures=(value)->::Google::Cloud::Speech::V2::RecognitionFeatures
Parameter
Returns

#language_codes

deflanguage_codes()->::Array<::String>
Returns
  • (::Array<::String>) — 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.

#language_codes=

deflanguage_codes=(value)->::Array<::String>
Parameter
  • value (::Array<::String>) — 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.

Returns
  • (::Array<::String>) — 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.

#model

defmodel()->::String
Returns
  • (::String) — 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.

#model=

defmodel=(value)->::String
Parameter
  • value (::String) — 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.

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

#transcript_normalization

deftranscript_normalization()->::Google::Cloud::Speech::V2::TranscriptNormalization
Returns
  • (::Google::Cloud::Speech::V2::TranscriptNormalization) — 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.

#transcript_normalization=

deftranscript_normalization=(value)->::Google::Cloud::Speech::V2::TranscriptNormalization
Parameter
  • value (::Google::Cloud::Speech::V2::TranscriptNormalization) — 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.
Returns
  • (::Google::Cloud::Speech::V2::TranscriptNormalization) — 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.

#translation_config

deftranslation_config()->::Google::Cloud::Speech::V2::TranslationConfig
Returns

#translation_config=

deftranslation_config=(value)->::Google::Cloud::Speech::V2::TranslationConfig
Parameter
Returns

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.