Contains audio data in the encoding specified in theRecognitionConfig. Eithercontentorurimust be supplied. Supplying both or neither returnsgoogle.rpc.Code.INVALID_ARGUMENT. Seecontent limits.
JSON representation
{// Union fieldaudio_sourcecan be only one of the following:"content":string,"uri":string// End of list of possible types for union fieldaudio_source.}
Fields
Union fieldaudio_source. The audio source, which is either inline content or a Google Cloud Storage uri.audio_sourcecan be only one of the following:
The audio data bytes encoded as specified inRecognitionConfig. 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 inRecognitionConfig. 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 returngoogle.rpc.Code.INVALID_ARGUMENT). For more information, seeRequest URIs.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-17 UTC."],[],[],null,["# RecognitionAudio\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nContains 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](https://cloud.google.com/speech-to-text/quotas#content)."]]