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 audio limits.

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.

Union field audio_source.

audio_source can be only one of the following:


string (bytes format)

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.

A base64-encoded 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 Request URIs.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Speech-to-Text
Need help? Visit our support page.