Class: Google::Cloud::Speech::V1::RecognitionAudio

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/speech/v1/doc/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. See limits[https://cloud.google.com/speech/limits#content].

Instance Attribute Summary collapse

Instance Attribute Details

#contentString

Returns The audio data bytes encoded as specified in +RecognitionConfig+. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

Returns:

  • (String)

    The audio data bytes encoded as specified in +RecognitionConfig+. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.



211
# File 'lib/google/cloud/speech/v1/doc/google/cloud/speech/v1/cloud_speech.rb', line 211

class RecognitionAudio; end

#uriString

Returns URI that points to a file that contains audio data bytes as specified in +RecognitionConfig+. 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 URIs[https://cloud.google.com/storage/docs/reference-uris].

Returns:

  • (String)

    URI that points to a file that contains audio data bytes as specified in +RecognitionConfig+. 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 URIs[https://cloud.google.com/storage/docs/reference-uris].



211
# File 'lib/google/cloud/speech/v1/doc/google/cloud/speech/v1/cloud_speech.rb', line 211

class RecognitionAudio; end