Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio

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

Plays audio from a file in Telephony Gateway.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio

Returns a new instance of GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio.



18461
18462
18463
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18461

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

Instance Attribute Details

#audio_uriString

Required. URI to a Google Cloud Storage object containing the audio to play, e. g., "gs://bucket/object". The object must contain a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. This object must be readable by the service-@gcp-sa-dialogflow.iam.gserviceaccount.com service account where is the number of the Telephony Gateway project (usually the same as the Dialogflow agent project). If the Google Cloud Storage bucket is in the Telephony Gateway project, this permission is added by default when enabling the Dialogflow V2 API. For audio from other sources, consider using the TelephonySynthesizeSpeech message with SSML. Corresponds to the JSON property audioUri

Returns:

  • (String)


18459
18460
18461
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18459

def audio_uri
  @audio_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



18466
18467
18468
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18466

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