Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2OutputAudioConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Instructs the speech synthesizer on 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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2OutputAudioConfig

Returns a new instance of GoogleCloudDialogflowV2OutputAudioConfig.



14256
14257
14258
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14256

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#audio_encodingString

Required. Audio encoding of the synthesized audio content. Corresponds to the JSON property audioEncoding

Returns:

  • (String)


14240
14241
14242
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14240

def audio_encoding
  @audio_encoding
end

#sample_rate_hertzFixnum

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). Corresponds to the JSON property sampleRateHertz

Returns:

  • (Fixnum)


14249
14250
14251
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14249

def sample_rate_hertz
  @sample_rate_hertz
end

#synthesize_speech_configGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2SynthesizeSpeechConfig

Configuration of how speech should be synthesized. Corresponds to the JSON property synthesizeSpeechConfig



14254
14255
14256
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14254

def synthesize_speech_config
  @synthesize_speech_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14261
14262
14263
14264
14265
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14261

def update!(**args)
  @audio_encoding = args[:audio_encoding] if args.key?(:audio_encoding)
  @sample_rate_hertz = args[:sample_rate_hertz] if args.key?(:sample_rate_hertz)
  @synthesize_speech_config = args[:synthesize_speech_config] if args.key?(:synthesize_speech_config)
end