Skip to main content
The Dictation API accepts short clips with the following constraints: Set the audio part’s Content-Type to match the format you send. Compressed formats (MP3, M4A, FLAC, OGG, and WebM) are rejected with 415.

WAV and raw PCM

For WAV, the sample rate and channel count are read from the file header, and the sample_rate and channels config fields are ignored. For raw PCM there is no header to read, so both fields are required in the config part:
Raw PCM is the easier format to upload while the user is still speaking, since frames can go on the wire as they come off the microphone with no container to finalize. See Uploading while recording.

When audio is rejected

Audio that violates a constraint is rejected with a 400, 413, or 415. On a chunked upload the 413 can arrive part-way through the request rather than at the end, because the server is measuring the audio as it arrives. See Error handling for the full table. For audio longer than 120 seconds, use Pre-recorded STT. For a live transcript while the speaker is still talking, use Real-time STT.