- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- BatchRecognizeFileMetadata
- RecognitionOutputConfig
- GcsOutputConfig
- InlineOutputConfig
- OutputFormatConfig
- NativeOutputFileFormatConfig
- VttOutputFileFormatConfig
- SrtOutputFileFormatConfig
- ProcessingStrategy
Performs batch asynchronous speech recognition: send a request with N audio files and receive a long running operation that can be polled to see when the transcriptions are finished.
HTTP request
POST https://{endpoint}/v2/{recognizer=projects/*/locations/*/recognizers/*}:batchRecognize
Where {endpoint}
is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
recognizer |
Required. The name of the Recognizer to use during recognition. The expected format is |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "config": { object ( |
Fields | |
---|---|
config |
Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the |
configMask |
The list of fields in This is a comma-separated list of fully qualified names of fields. Example: |
files[] |
Audio files with file metadata for ASR. The maximum number of files allowed to be specified is 15. |
recognitionOutputConfig |
Configuration options for where to output the transcripts of each file. |
processingStrategy |
Processing strategy to use for this request. |
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the recognizer
resource:
speech.recognizers.recognize
For more information, see the IAM documentation.
BatchRecognizeFileMetadata
Metadata about a single file in a batch for recognizers.batchRecognize.
JSON representation |
---|
{ "config": { object ( |
Fields | |
---|---|
config |
Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the |
configMask |
The list of fields in This is a comma-separated list of fully qualified names of fields. Example: |
Union field audio_source . The audio source, which is a Google Cloud Storage URI. audio_source can be only one of the following: |
|
uri |
Cloud Storage URI for the audio file. |
RecognitionOutputConfig
Configuration options for the output(s) of recognition.
JSON representation |
---|
{ "outputFormatConfig": { object ( |
Fields | |
---|---|
outputFormatConfig |
Optional. Configuration for the format of the results stored to |
Union field
|
|
gcsOutputConfig |
If this message is populated, recognition results are written to the provided Google Cloud Storage URI. |
inlineResponseConfig |
If this message is populated, recognition results are provided in the |
GcsOutputConfig
Output configurations for Cloud Storage.
JSON representation |
---|
{ "uri": string } |
Fields | |
---|---|
uri |
The Cloud Storage URI prefix with which recognition results will be written. |
InlineOutputConfig
This type has no fields.
Output configurations for inline response.
OutputFormatConfig
Configuration for the format of the results stored to output
.
JSON representation |
---|
{ "native": { object ( |
Fields | |
---|---|
native |
Configuration for the native output format. If this field is set or if no other output format field is set, then transcripts will be written to the sink in the native format. |
vtt |
Configuration for the VTT output format. If this field is set, then transcripts will be written to the sink in the VTT format. |
srt |
Configuration for the SRT output format. If this field is set, then transcripts will be written to the sink in the SRT format. |
NativeOutputFileFormatConfig
This type has no fields.
Output configurations for serialized BatchRecognizeResults
protos.
VttOutputFileFormatConfig
This type has no fields.
Output configurations for WebVTT formatted subtitle file.
SrtOutputFileFormatConfig
This type has no fields.
Output configurations SubRip Text formatted subtitle file.
ProcessingStrategy
Possible processing strategies for batch requests.
Enums | |
---|---|
PROCESSING_STRATEGY_UNSPECIFIED |
Default value for the processing strategy. The request is processed as soon as its received. |
DYNAMIC_BATCHING |
If selected, processes the request during lower utilization periods for a price discount. The request is fulfilled within 24 hours. |