Set Audio Configurations
Last updated Apr 21, 2026
Recording audio requires configuring the codec and channel parameters to guarantee optimal quality and compatibility with your application's demands. The codec determines the encoding format for the audio, and the channel specifies the number of audio channels for the recording. You can modify the following audio_config used for recording the audio:
Codec
Codec determines the audio encoding format for recording, with MP3 and AAC being the supported formats.
- AAC (default)
- MP3
Note
If VP8 is selected for video_config, changing audio_config is not allowed. In this case, the codec in the audio_config is automatically set to vorbis.
Channel
Audio signal pathway within an audio file that carries a specific sound source. The following channels are supported:
- stereo (default)
- mono
You can modify the configs by specifying it in the audio_config field in the Start Recording API, for example:
{
"audio_config": {
"codec": "AAC"
"channel": "stereo"
}
}
Download Audio Files
The audio file for your recording is generated only if you passed the audio_config parameters in the Start Recording API.
When the recording is completed, you can use the audio_download_url provided in the response body of the Fetch details of a recording API to download and export the audio file.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/realtime/realtimekit/recording-guide/configure-audio-codec/#page","headline":"Set Audio Configurations","description":"Configure audio codec format and channel settings for RealtimeKit recordings.","url":"https://developers.cloudflare.com/realtime/realtimekit/recording-guide/configure-audio-codec/","inLanguage":"en","image":"https://developers.cloudflare.com/realtime/realtimekit/recording-guide/configure-audio-codec/og.png?v=8c84befdbf726b42","dateModified":"2026-04-21","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Configure video codecs, resolution, and container formats for RealtimeKit recordings. title: Configure Video Settings image: https://developers.cloudflare.com/realtime/realtimekit/recording-guide/configure-codecs/og.png?v=be02e7f7d1c1a21e
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/realtime/llms.txt
Use this file to discover all available pages before exploring further.
Docs