Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1AudioInput

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

Represents the natural speech audio to be processed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1AudioInput

Returns a new instance of GoogleCloudDialogflowCxV3beta1AudioInput.



3122
3123
3124
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3122

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

Instance Attribute Details

#audioString

The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both config and audio must be provided. For streaming audio detect intent, config must be provided in the first request and audio must be provided in all following requests. Corresponds to the JSON property audio NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


3115
3116
3117
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3115

def audio
  @audio
end

#configGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3beta1InputAudioConfig

Instructs the speech recognizer on how to process the audio content. Corresponds to the JSON property config



3120
3121
3122
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3120

def config
  @config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3127
3128
3129
3130
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 3127

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