Class: Google::Apis::SpeechV1::RecognizeRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpeechV1::RecognizeRequest
- 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
-
#audio ⇒ Google::Apis::SpeechV1::RecognitionAudio
Contains audio data in the encoding specified in the
RecognitionConfig
. -
#config ⇒ Google::Apis::SpeechV1::RecognitionConfig
Provides information to the recognizer that specifies how to process the request.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RecognizeRequest
constructor
A new instance of RecognizeRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RecognizeRequest
Returns a new instance of RecognizeRequest.
1067 1068 1069 |
# File 'lib/google/apis/speech_v1/classes.rb', line 1067 def initialize(**args) update!(**args) end |
Instance Attribute Details
#audio ⇒ Google::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
1059 1060 1061 |
# File 'lib/google/apis/speech_v1/classes.rb', line 1059 def audio @audio end |
#config ⇒ Google::Apis::SpeechV1::RecognitionConfig
Provides information to the recognizer that specifies how to process the
request.
Corresponds to the JSON property config
1065 1066 1067 |
# File 'lib/google/apis/speech_v1/classes.rb', line 1065 def config @config end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1072 1073 1074 1075 |
# File 'lib/google/apis/speech_v1/classes.rb', line 1072 def update!(**args) @audio = args[:audio] if args.key?(:audio) @config = args[:config] if args.key?(:config) end |