NAME

Google::Cloud::Dialogflow::V2beta1::AudioConfig - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2beta1/audio_config.proto

SYNOPSIS

use Google::Cloud::Dialogflow::V2beta1::AudioConfig;

my $msg = Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechContext->new({
    phrases => $phrases,
    boost => $boost,
});

# Read or update a field
my $val = $msg->phrases();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechContext->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2beta1/audio_config.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechContext

Hints for the speech recognizer to help with recognition in a specific conversation state.

Inherits from Protobuf::Message.

Accessors

  • $msg->phrases() / $msg->phrases($value)

    Type: String

    Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

    This list can be used to:

    * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ...

    See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits.

  • $msg->boost() / $msg->boost($value)

    Type: Float

    Optional. Boost for this context compared to other contexts:

    * If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases. * If the boost is unspecified or non-positive, Dialogflow will not apply any boost.

    Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechWordInfo

Information for a word recognized by the speech recognizer.

Inherits from Protobuf::Message.

Accessors

  • $msg->word() / $msg->word($value)

    Type: String

    The word this info is for.

  • $msg->start_offset() / $msg->start_offset($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Time offset relative to the beginning of the audio that corresponds to the start of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.

  • $msg->end_offset() / $msg->end_offset($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Time offset relative to the beginning of the audio that corresponds to the end of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.

  • $msg->confidence() / $msg->confidence($value)

    Type: Float

    The Speech confidence between 0.0 and 1.0 for this word. A higher number indicates an estimated greater likelihood that the recognized word is correct. The default of 0.0 is a sentinel value indicating that confidence was not set.

    This field is not guaranteed to be fully stable over time for the same audio input. Users should also not rely on it to always be provided.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::BargeInConfig

Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request.

The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases:

* No barge-in phase: which goes first and during which speech detection should not be carried out.

* Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase.

The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length from the start of the input audio.

The flow goes like below:

``` --> Time

without speech detection | utterance only | utterance or no-speech event | | +-------------+ | +------------+ | +---------------+ ----------+ no barge-in +-|-+ barge-in +-|-+ normal period +----------- +-------------+ | +------------+ | +---------------+ ```

No-speech event is a response with END_OF_UTTERANCE without any transcript following up.

Inherits from Protobuf::Message.

Accessors

  • $msg->no_barge_in_duration() / $msg->no_barge_in_duration($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Duration that is not eligible for barge-in at the beginning of the input audio.

  • $msg->total_duration() / $msg->total_duration($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Total duration for the playback at the beginning of the input audio.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::InputAudioConfig

Instructs the speech recognizer on how to process the audio content.

Inherits from Protobuf::Message.

Accessors

  • $msg->audio_encoding() / $msg->audio_encoding($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::AudioEncoding)

    Required. Audio encoding of the audio content to process.

  • $msg->sample_rate_hertz() / $msg->sample_rate_hertz($value)

    Type: Int32

    Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details.

  • $msg->language_code() / $msg->language_code($value)

    Type: String

    Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) 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. If not set, the language is inferred from the [ConversationProfile.stt_config][google.cloud.dialogflow.v2beta1.ConversationProfile.stt_config].

  • $msg->enable_word_info() / $msg->enable_word_info($value)

    Type: Bool

    If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.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.

  • $msg->phrase_hints() / $msg->phrase_hints($value)

    Type: String

    A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

    See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.

    This field is deprecated. Please use [`speech_contexts`]() instead. If you specify both [`phrase_hints`]() and [`speech_contexts`](), Dialogflow will treat the [`phrase_hints`]() as a single additional [`SpeechContext`]().

  • $msg->speech_contexts() / $msg->speech_contexts($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechContext)

    Context information to assist speech recognition.

    See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.

  • $msg->model() / $msg->model($value)

    Type: String

    Optional. Which Speech model to select for the given request. For more information, see [Speech models](https://cloud.google.com/dialogflow/es/docs/speech-models).

  • $msg->model_variant() / $msg->model_variant($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::SpeechModelVariant)

    Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.

  • $msg->single_utterance() / $msg->single_utterance($value)

    Type: Bool

    If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance.

  • $msg->enable_voice_activity_events() / $msg->enable_voice_activity_events($value)

    Type: Bool

    Optional. If `true`, responses with voice activity speech events will be returned as they are detected. Note: This setting is relevant only for streaming methods.

  • $msg->disable_no_speech_recognized_event() / $msg->disable_no_speech_recognized_event($value)

    Type: Bool

    Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent]. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.

  • $msg->barge_in_config() / $msg->barge_in_config($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::BargeInConfig)

    Configuration of barge-in behavior during the streaming of input audio.

  • $msg->enable_automatic_punctuation() / $msg->enable_automatic_punctuation($value)

    Type: Bool

    Enable automatic punctuation option at the speech backend.

  • $msg->default_no_speech_timeout() / $msg->default_no_speech_timeout($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    If set, use this no-speech timeout when the agent does not provide a no-speech timeout itself.

  • $msg->phrase_sets() / $msg->phrase_sets($value)

    Type: String

    A collection of phrase set resources to use for speech adaptation.

  • $msg->opt_out_conformer_model_migration() / $msg->opt_out_conformer_model_migration($value)

    Type: Bool

    If `true`, the request will opt out for STT conformer model migration. This field will be deprecated once force migration takes place in June 2024. Please refer to [Dialogflow ES Speech model migration](https://cloud.google.com/dialogflow/es/docs/speech-model-migration).

  • $msg->gemini_asr_config() / $msg->gemini_asr_config($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechToTextConfig::GeminiAsrConfig)

    Optional. Configuration for using Gemini ASR models served via Vertex AI. This field is only used when `use_gemini_asr` is true.

  • $msg->use_gemini_asr() / $msg->use_gemini_asr($value)

    Type: Bool

    Optional. If true, Gemini ASR will be used for transcription instead of Cloud Speech-to-Text. If false, Cloud Speech-to-Text will be used. If unset, this setting is inherited from the ConversationProfile.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::VoiceSelectionParams

Description of which voice to use for speech synthesis.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and [ssml_gender][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.ssml_gender].

    For the list of available voices, please refer to [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices).

  • $msg->ssml_gender() / $msg->ssml_gender($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::SsmlVoiceGender)

    Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and [name][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::SynthesizeSpeechConfig

Configuration of how speech should be synthesized.

Inherits from Protobuf::Message.

Accessors

  • $msg->speaking_rate() / $msg->speaking_rate($value)

    Type: Double

    Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.

  • $msg->pitch() / $msg->pitch($value)

    Type: Double

    Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.

  • $msg->volume_gain_db() / $msg->volume_gain_db($value)

    Type: Double

    Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.

  • $msg->effects_profile_id() / $msg->effects_profile_id($value)

    Type: String

    Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.

  • $msg->voice() / $msg->voice($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::VoiceSelectionParams)

    Optional. The desired voice of the synthesized audio.

  • $msg->pronunciations() / $msg->pronunciations($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::CustomPronunciationParams)

    Optional. The custom pronunciations for the synthesized audio.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::CustomPronunciationParams

Pronunciation customization for a phrase.

Inherits from Protobuf::Message.

Accessors

  • $msg->phrase() / $msg->phrase($value)

    Type: String

    The phrase to which the customization is applied. The phrase can be multiple words, such as proper nouns, but shouldn't span the length of the sentence.

  • $msg->phonetic_encoding() / $msg->phonetic_encoding($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::CustomPronunciationParams::PhoneticEncoding)

    The phonetic encoding of the phrase.

  • $msg->pronunciation() / $msg->pronunciation($value)

    Type: String

    The pronunciation of the phrase. This must be in the phonetic encoding specified above.

Enum: CustomPronunciationParams::PhoneticEncoding

  • PHONETIC_ENCODING_UNSPECIFIED => 0

  • PHONETIC_ENCODING_IPA => 1

  • PHONETIC_ENCODING_X_SAMPA => 2

Google::Cloud::Dialogflow::V2beta1::AudioConfig::OutputAudioConfig

Instructs the speech synthesizer how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.

Inherits from Protobuf::Message.

Accessors

  • $msg->audio_encoding() / $msg->audio_encoding($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::OutputAudioEncoding)

    Required. Audio encoding of the synthesized audio content.

  • $msg->sample_rate_hertz() / $msg->sample_rate_hertz($value)

    Type: Int32

    The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

  • $msg->synthesize_speech_config() / $msg->synthesize_speech_config($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::SynthesizeSpeechConfig)

    Configuration of how speech should be synthesized.

Google::Cloud::Dialogflow::V2beta1::AudioConfig::TelephonyDtmfEvents

A wrapper of repeated TelephonyDtmf digits.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechToTextConfig

Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile].

Inherits from Protobuf::Message.

Accessors

  • $msg->speech_model_variant() / $msg->speech_model_variant($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::SpeechModelVariant)

    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][google.cloud.dialogflow.v2beta1.AnalyzeContentRequest] and [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2beta1.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.

  • $msg->model() / $msg->model($value)

    Type: 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](https://cloud.google.com/speech-to-text/docs/basics#select-model) 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](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) for model selection.

  • $msg->phrase_sets() / $msg->phrase_sets($value)

    Type: String

    List of names of Cloud Speech phrase sets that are used for transcription. For phrase set limitations, please refer to [Cloud Speech API quotas and limits](https://cloud.google.com/speech-to-text/quotas#content).

  • $msg->audio_encoding() / $msg->audio_encoding($value)

    Type: Enum (Google::Cloud::Dialogflow::V2beta1::AudioEncoding)

    Audio encoding of the audio content to process.

  • $msg->sample_rate_hertz() / $msg->sample_rate_hertz($value)

    Type: Int32

    Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details.

  • $msg->language_code() / $msg->language_code($value)

    Type: String

    The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) 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. If not specified, the default language configured at [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] is used.

  • $msg->enable_word_info() / $msg->enable_word_info($value)

    Type: Bool

    If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.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.

  • $msg->use_timeout_based_endpointing() / $msg->use_timeout_based_endpointing($value)

    Type: Bool

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

  • $msg->gemini_asr_config() / $msg->gemini_asr_config($value)

    Type: Message (Google::Cloud::Dialogflow::V2beta1::AudioConfig::SpeechToTextConfig::GeminiAsrConfig)

    Optional. Configuration for using Gemini ASR models served via Vertex AI, overriding the default Gemini ASR model or providing additional advanced parameters. This field is only used when `use_gemini_asr` is true.

  • $msg->use_gemini_asr() / $msg->use_gemini_asr($value)

    Type: Bool

    Optional. If true, Gemini ASR will be used for transcription instead of Cloud Speech-to-Text.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2beta1::AudioConfig::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.