Class: Google::Cloud::Speech::V1::RecognitionAudio
- Inherits:
-
Object
- Object
- Google::Cloud::Speech::V1::RecognitionAudio
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/speech/v1/cloud_speech.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][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 Attribute Details
#content ⇒ ::String
Returns 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.
643 644 645 646 |
# File 'proto_docs/google/cloud/speech/v1/cloud_speech.rb', line 643 class RecognitionAudio include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#uri ⇒ ::String
Returns 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][google.rpc.Code.INVALID_ARGUMENT]).
For more information, see Request
URIs.
643 644 645 646 |
# File 'proto_docs/google/cloud/speech/v1/cloud_speech.rb', line 643 class RecognitionAudio include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |