NAME

Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig - Compiled Protocol Buffers messages for google/cloud/dialogflow/cx/v3beta1/audio_config.proto

SYNOPSIS

use Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig;

my $msg = Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig::SpeechWordInfo->new({
    word => $word,
    start_offset => $start_offset,
    end_offset => $end_offset,
    confidence => $confidence,
});

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

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

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/cx/v3beta1/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::Cx::V3beta1::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::Cx::V3beta1::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.

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::Cx::V3beta1::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::Cx::V3beta1::AudioEncoding)

    Required. 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->enable_word_info() / $msg->enable_word_info($value)

    Type: Bool

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

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

  • $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/cx/docs/concept/speech-models).

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

    Type: Enum (Google::Cloud::Dialogflow::Cx::V3beta1::SpeechModelVariant)

    Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.

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

    Type: Bool

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

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

    Type: Message (Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig::BargeInConfig)

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

  • $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 CX Speech model migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).

Google::Cloud::Dialogflow::Cx::V3beta1::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.cx.v3beta1.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::Cx::V3beta1::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.cx.v3beta1.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::Cx::V3beta1::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::Cx::V3beta1::AudioConfig::VoiceSelectionParams)

    Optional. The desired voice of the synthesized audio.

Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig::OutputAudioConfig

Instructs the speech synthesizer how to generate the output audio content.

Inherits from Protobuf::Message.

Accessors

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

    Type: Enum (Google::Cloud::Dialogflow::Cx::V3beta1::OutputAudioEncoding)

    Required. Audio encoding of the synthesized audio content.

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

    Type: Int32

    Optional. 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::Cx::V3beta1::AudioConfig::SynthesizeSpeechConfig)

    Optional. Configuration of how speech should be synthesized. If not specified, [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings] is applied.

Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig::TextToSpeechSettings

Settings related to speech synthesizing.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Cloud::Dialogflow::Cx::V3beta1::AudioConfig::TextToSpeechSettings::SynthesizeSpeechConfigsEntry)

    Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/cx/docs/reference/language) to SynthesizeSpeechConfig.

    These settings affect:

    - The [phone
    gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway)
      synthesize configuration set via
      [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings].
    
    - How speech is synthesized when invoking
    [session][google.cloud.dialogflow.cx.v3beta1.Sessions] APIs.
      [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings]
      only applies if
      [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesize_speech_config]
      is not specified.

SEE ALSO

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

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.