Class: Google::Cloud::Speech::V2::RecognitionConfig

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/speech/v2/cloud_speech.rb

Overview

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

Instance Attribute Summary collapse

Instance Attribute Details

#adaptation::Google::Cloud::Speech::V2::SpeechAdaptation

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

Returns:



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#auto_decoding_config::Google::Cloud::Speech::V2::AutoDetectDecodingConfig

Returns Automatically detect decoding parameters. Preferred for supported formats.

Returns:



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#explicit_decoding_config::Google::Cloud::Speech::V2::ExplicitDecodingConfig

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

Returns:



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#features::Google::Cloud::Speech::V2::RecognitionFeatures

Returns Speech recognition features to enable.

Returns:



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#language_codes::Array<::String>

Returns 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.



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#model::String

Returns 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.



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#transcript_normalization::Google::Cloud::Speech::V2::TranscriptNormalization

Returns 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.



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#translation_config::Google::Cloud::Speech::V2::TranslationConfig

Returns Optional. Optional configuration used to automatically run translation on the given audio to the desired language for supported models.

Returns:



663
664
665
666
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 663

class RecognitionConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end