Request message for the
Recognize method. Either
content or uri must be supplied. Supplying both or neither
returns INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
content
limits <https://cloud.google.com/speech-to-text/quotas#content>__.
This message has oneof_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
str
Required. The name of the Recognizer to use during
recognition. The expected format is
projects/{project}/locations/{location}/recognizers/{recognizer}.
The {recognizer} segment may be set to _ to use an empty
implicit Recognizer.
config
google.cloud.speech_v2.types.RecognitionConfig
Features and audio metadata to use for the Automatic Speech
Recognition. This field in combination with the
config_mask
field can be used to override parts of the
default_recognition_config
of the Recognizer resource.
config_mask
google.protobuf.field_mask_pb2.FieldMask
The list of fields in
config
that override the values in the
default_recognition_config
of the recognizer during this recognition request. If no
mask is provided, all non-default valued fields in
config
override the values in the recognizer for this recognition
request. If a mask is provided, only the fields listed in
the mask override the config in the recognizer for this
recognition request. If a wildcard (*) is provided,
config
completely overrides and replaces the config in the
recognizer for this recognition request.
content
bytes
The audio data bytes encoded as specified in
RecognitionConfig.
As with all bytes fields, proto buffers use a pure binary
representation, whereas JSON representations use base64.
This field is a member of oneof_ audio_source.
uri
str
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
INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
more information, see `Request
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-08-28 UTC."],[],[],null,["# Class RecognizeRequest (2.33.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.33.0 (latest)](/python/docs/reference/speech/latest/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.32.0](/python/docs/reference/speech/2.32.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.31.0](/python/docs/reference/speech/2.31.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.30.0](/python/docs/reference/speech/2.30.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.29.0](/python/docs/reference/speech/2.29.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.28.1](/python/docs/reference/speech/2.28.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.27.0](/python/docs/reference/speech/2.27.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.26.1](/python/docs/reference/speech/2.26.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.25.1](/python/docs/reference/speech/2.25.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.24.1](/python/docs/reference/speech/2.24.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.23.0](/python/docs/reference/speech/2.23.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.22.0](/python/docs/reference/speech/2.22.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.21.1](/python/docs/reference/speech/2.21.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.20.1](/python/docs/reference/speech/2.20.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.19.0](/python/docs/reference/speech/2.19.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.18.0](/python/docs/reference/speech/2.18.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.17.3](/python/docs/reference/speech/2.17.3/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.16.2](/python/docs/reference/speech/2.16.2/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.15.1](/python/docs/reference/speech/2.15.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.14.1](/python/docs/reference/speech/2.14.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.13.1](/python/docs/reference/speech/2.13.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.12.0](/python/docs/reference/speech/2.12.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.11.1](/python/docs/reference/speech/2.11.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.10.0](/python/docs/reference/speech/2.10.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.9.3](/python/docs/reference/speech/2.9.3/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.8.0](/python/docs/reference/speech/2.8.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.7.0](/python/docs/reference/speech/2.7.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.6.0](/python/docs/reference/speech/2.6.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.5.1](/python/docs/reference/speech/2.5.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.4.1](/python/docs/reference/speech/2.4.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.3.0](/python/docs/reference/speech/2.3.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.2.1](/python/docs/reference/speech/2.2.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.1.0](/python/docs/reference/speech/2.1.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [2.0.1](/python/docs/reference/speech/2.0.1/google.cloud.speech_v2.types.RecognizeRequest)\n- [1.3.4](/python/docs/reference/speech/1.3.4/google.cloud.speech_v2.types.RecognizeRequest)\n- [1.2.0](/python/docs/reference/speech/1.2.0/google.cloud.speech_v2.types.RecognizeRequest)\n- [1.1.0](/python/docs/reference/speech/1.1.0/google.cloud.speech_v2.types.RecognizeRequest) \n\n RecognizeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nRequest message for the\nRecognize method. Either\n`content` or `uri` must be supplied. Supplying both or neither\nreturns `INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]`. See\n`content\nlimits \u003chttps://cloud.google.com/speech-to-text/quotas#content\u003e`__.\n\nThis message has `oneof`_ fields (mutually exclusive fields).\nFor each oneof, at most one member field can be set at the same time.\nSetting any member of the oneof automatically clears all other\nmembers.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e"]]