Class: Google::Apis::SpeechV1::RecognizeRequest

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RecognizeRequest

Returns a new instance of RecognizeRequest.



838
839
840
# File 'lib/google/apis/speech_v1/classes.rb', line 838

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

Instance Attribute Details

#audioGoogle::Apis::SpeechV1::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 content limits. Corresponds to the JSON property audio



830
831
832
# File 'lib/google/apis/speech_v1/classes.rb', line 830

def audio
  @audio
end

#configGoogle::Apis::SpeechV1::RecognitionConfig

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



836
837
838
# File 'lib/google/apis/speech_v1/classes.rb', line 836

def config
  @config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



843
844
845
846
# File 'lib/google/apis/speech_v1/classes.rb', line 843

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