Class: Google::Apis::SpeechV1beta1::AsyncRecognizeRequest

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

Overview

The top-level message sent by the client for the AsyncRecognize method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AsyncRecognizeRequest

Returns a new instance of AsyncRecognizeRequest



322
323
324
# File 'generated/google/apis/speech_v1beta1/classes.rb', line 322

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

Instance Attribute Details

#audioGoogle::Apis::SpeechV1beta1::RecognitionAudio

Contains audio data in the encoding specified in the RecognitionConfig. Either content or uri must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. See audio limits. Corresponds to the JSON property audio



320
321
322
# File 'generated/google/apis/speech_v1beta1/classes.rb', line 320

def audio
  @audio
end

#configGoogle::Apis::SpeechV1beta1::RecognitionConfig

Provides information to the recognizer that specifies how to process the request. Corresponds to the JSON property config



312
313
314
# File 'generated/google/apis/speech_v1beta1/classes.rb', line 312

def config
  @config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



327
328
329
330
# File 'generated/google/apis/speech_v1beta1/classes.rb', line 327

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