# RecognitionAudio

- [JSON representation](https://docs.cloud.google.com/speech-to-text/docs/reference/rest/v1/RecognitionAudio#SCHEMA_REPRESENTATION)

Contains audio data in the encoding specified in the `RecognitionConfig`. Either `content` or `uri` must be supplied. Supplying both or neither returns `https://docs.cloud.google.com/speech-to-text/docs/reference/rest/Shared.Types/Code#ENUM_VALUES.INVALID_ARGUMENT`. See [content limits](https://cloud.google.com/speech-to-text/quotas#content).

| JSON representation |
|---|
| ``` { // Union field `audio_source` can be only one of the following: "content": string, "uri": string // End of list of possible types for union field `audio_source`. } ``` |

| Fields ||
|---|---|
| Union field `audio_source`. The audio source, which is either inline content or a Google Cloud Storage uri. `audio_source` can be only one of the following: ||
| `content` | `string (https://developers.google.com/discovery/v1/type-format format)` 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. A base64-encoded string. |
| `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 `https://docs.cloud.google.com/speech-to-text/docs/reference/rest/Shared.Types/Code#ENUM_VALUES.INVALID_ARGUMENT`). For more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris). |