Transcribe an audio/video file

Submit audio for transcription, The body of the POST contains the binary audio.

The Content-Type header should be set according to the media type. Most popular audio and video file formats are supported, including the following:

mp3 - audio/mpeg
m4a - audio/m4a
ogg - audio/ogg
flac - audio/x-flac
wav - audio/x-wav, audio/wav

Channel Layout format

The format is [stream].channel[,[stream].channel] where stream identifies which media stream in the audio file to select and channel is the audio channel. Both values are zero based, so the first stream is ‘0’ and the first audio channel within the stream is ‘0’. If ‘stream’ is not defined, ‘0’ is assumed.

Examples:
channel_layout=0 selects the first audio channel within the first media stream.
channel_layout=0,1 selects the first two channels in the first media stream.

If this parameter is not specified, all audio channels from all media stream are processed.


User request completion callback

When submitting a request, an optional HTTP callback can be specified which will be invoked when the request completes or fails. The callback is an HTTP POST to the exact URL provided. Only one attempt is made to reach the URL provided. The contents of the HTTP request match the response from the “Querying a request status and retrieving results” above.

Headers

  • x-requestid - Contains the request_id received when the request was submitted
  • x-status - One of the following indicating the status of the request:
StatusDescription
"Completed"The request has finished processing and the user callback, if provided has been called.
"Failed"An error occurred processing the request.
  • x-error - If the request failed, this would contain an error message.
  • x-userdata - This will contain the user data supplied with the original request.

Body

If the status is "Completed" the body of the request contains the results from the translation. If the status is "Failed" the body of the request contains the same error message provided in the x-error header.

Details

Language
Credentials
Header
Click Try It! to start a request and see the response here!