Skip to content

Encoding your audio stream

All audio streams provided should be encoded as PCM WAVE, 16khz mono. The following ffmpeg command can be used to convert your input before sending it to our API:

ffmpeg -y -i "${input_file}" \
    -ac 1 -acodec pcm_s16le -ar 16000 \
    -f wav "${output_file}"

This command can also be used in a pipe in which ${input_file} and ${output_file} can be set to “-“ for respectively stdin and stdout.

FFmpeg support

It may be possible that other flags are suitable for this type of configuration. But adding/enabling those is out of scope of this document. If you need any support with encoding, please contact us as [email protected].