# Cloud Speech-to-Text V1p1beta1 API - Class Google::Cloud::Speech::V1p1beta1::RecognitionAudio (v0.30.0)

0.30.0 (latest) 0.29.1 0.28.0 0.27.1 0.26.0 0.25.0 0.24.1 0.23.0 0.22.0 0.21.1 0.20.2 0.19.0 0.18.1 0.17.1 0.16.0 0.15.3 0.14.0 0.13.0 0.12.4 Reference documentation and code samples for the Cloud Speech-to-Text V1p1beta1 API class Google::Cloud::Speech::V1p1beta1::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\]\[google.rpc.Code.INVALID_ARGUMENT\].
See [content limits](https://cloud.google.com/speech-to-text/quotas#content).

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #content

    def content() -> ::String

**Returns**

- (::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.


  Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #content=

    def content=(value) -> ::String

**Parameter**

- **value** (::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.


  Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::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.


  Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #uri

    def uri() -> ::String

**Returns**

- (::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\]\[google.rpc.Code.INVALID_ARGUMENT\]). For more information, see [Request
  URIs](https://cloud.google.com/storage/docs/reference-uris).


  Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #uri=

    def uri=(value) -> ::String

**Parameter**

- **value** (::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\]\[google.rpc.Code.INVALID_ARGUMENT\]). For more information, see [Request
  URIs](https://cloud.google.com/storage/docs/reference-uris).


  Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::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\]\[google.rpc.Code.INVALID_ARGUMENT\]). For more information, see [Request
  URIs](https://cloud.google.com/storage/docs/reference-uris).


  Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.