Class: Google::Cloud::Dialogflow::V2::SpeechToTextConfig

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

Overview

Configures speech transcription for ConversationProfile.

Instance Attribute Summary collapse

Instance Attribute Details

#audio_encoding::Google::Cloud::Dialogflow::V2::AudioEncoding

Returns Audio encoding of the audio content to process.

Returns:



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#enable_word_info::Boolean

Returns If true, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.

Returns:

  • (::Boolean)

    If true, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#language_code::String

Returns The language of the supplied audio. Dialogflow does not do translations. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.

Returns:

  • (::String)

    The language of the supplied audio. Dialogflow does not do translations. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#model::String

Returns Which Speech model to select. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then Dialogflow auto-selects a model based on other parameters in the SpeechToTextConfig and Agent settings. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to Cloud Speech API documentation for more details. If you specify a model, the following models typically have the best performance:

  • phone_call (best for Agent Assist and telephony)
  • latest_short (best for Dialogflow non-telephony)
  • command_and_search

Leave this field unspecified to use Agent Speech settings for model selection.

Returns:

  • (::String)

    Which Speech model to select. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then Dialogflow auto-selects a model based on other parameters in the SpeechToTextConfig and Agent settings. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to Cloud Speech API documentation for more details. If you specify a model, the following models typically have the best performance:

    • phone_call (best for Agent Assist and telephony)
    • latest_short (best for Dialogflow non-telephony)
    • command_and_search

    Leave this field unspecified to use Agent Speech settings for model selection.



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#phrase_sets::Array<::String>

Returns List of names of Cloud Speech phrase sets that are used for transcription.

Returns:

  • (::Array<::String>)

    List of names of Cloud Speech phrase sets that are used for transcription.



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#sample_rate_hertz::Integer

Returns Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.

Returns:



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#speech_model_variant::Google::Cloud::Dialogflow::V2::SpeechModelVariant

Returns The speech model used in speech to text. SPEECH_MODEL_VARIANT_UNSPECIFIED, USE_BEST_AVAILABLE will be treated as USE_ENHANCED. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request. If enhanced model variant is specified and an enhanced version of the specified model for the language does not exist, then it would emit an error.

Returns:



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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

#use_timeout_based_endpointing::Boolean

Returns Use timeout based endpointing, interpreting endpointer sensitivy as seconds of timeout value.

Returns:

  • (::Boolean)

    Use timeout based endpointing, interpreting endpointer sensitivy as seconds of timeout value.



328
329
330
331
# File 'proto_docs/google/cloud/dialogflow/v2/audio_config.rb', line 328

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