Class: Google::Apis::SpeechV1p1beta1::RecognitionAudio
- Inherits:
-
Object
- Object
- Google::Apis::SpeechV1p1beta1::RecognitionAudio
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/speech_v1p1beta1/classes.rb,
lib/google/apis/speech_v1p1beta1/representations.rb,
lib/google/apis/speech_v1p1beta1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#content ⇒ String
The audio data bytes encoded as specified in
RecognitionConfig. -
#uri ⇒ String
URI that points to a file that contains audio data bytes as specified in
RecognitionConfig.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RecognitionAudio
constructor
A new instance of RecognitionAudio.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RecognitionAudio
Returns a new instance of RecognitionAudio.
565 566 567 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 565 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
The audio data bytes encoded as specified in RecognitionConfig. Note: as
with all bytes fields, proto buffers use a pure binary representation, whereas
JSON representations use base64.
Corresponds to the JSON property content
NOTE: Values are automatically base64 encoded/decoded in the client library.
553 554 555 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 553 def content @content end |
#uri ⇒ String
URI that points to a file that contains audio data bytes as specified in
RecognitionConfig. The file must not be compressed (for example, gzip).
Currently, only Google Cloud Storage URIs are supported, which must be
specified in the following format: gs://bucket_name/object_name (other URI
formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see
Request URIs.
Corresponds to the JSON property uri
563 564 565 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 563 def uri @uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
570 571 572 573 |
# File 'lib/google/apis/speech_v1p1beta1/classes.rb', line 570 def update!(**args) @content = args[:content] if args.key?(:content) @uri = args[:uri] if args.key?(:uri) end |