What is an audio codec? It is a method for encoding sound into compact data and decoding it back for playback. MP3, AAC or Opus are common examples. The codec decides how the audio is squeezed, while the file extension only names the wrapper that holds it.
Transcribe a recording
Send your voice message, audio or video to @potok_now_bot on Telegram and the text comes back in the chat.
Open @potok_now_bot in Telegram
Files up to 2 GB · export to TXT, MD, DOCX, PDF, SRT and VTT · speaker labels and timestamps · about 30 languages
Key facts
- A codec and a file format are different things: one file type, such as M4A, can hold audio made by more than one codec.
- Lossy codecs drop detail to save space; lossless codecs shrink the data and give back every sample on decoding.
- Opus was designed with speech in mind, which is why voice messages in many chat apps use it.
- Decoding happens on playback, so a codec you cannot open locally usually means a missing player, not damaged audio.
What it looks like
// which codec is inside the file?
ffprobe -hide_banner -select_streams a talk.m4a
// Stream #0:0: Audio: aac, 44100 Hz, stereo, 96 kb/s
// re-encode a voice recording with Opus at a modest rate
ffmpeg -i talk.wav -c:a libopus -b:a 32k talk.opus
More
See the full list of languages, the tools and the glossary.
Frequently asked questions
What is the difference between a codec and a container?
The codec compresses the sound. The container, such as MP4 or Ogg, is the file that stores the compressed stream together with other streams and metadata.
Which codec is best for speech?
Opus and AAC both handle voice well at modest rates. For a recording you plan to transcribe, a clean source matters more than the choice between them.
Does the codec change how well text is recognised?
Heavy compression can blur quiet consonants and make names harder to catch. Moderate settings on a clear voice usually leave recognition unaffected.
Can I send any codec to the Potok bot?
The bot accepts voice, audio and video files, including a file sent as a document, up to 2 GB. Very rare codecs may need converting first.
How do I find out which codec a file uses?
Open the file properties in a media player, or run ffprobe on it. The audio stream line names the codec, the rate and the channels.
Sources
Each source was opened by hand on the date shown. Pages change, so open the source if a detail matters to you.
- Audio codec (Wikipedia), Wikipedia · checked
- Opus audio format (Wikipedia), Wikipedia · checked
Try it on your own recording
Send your voice message, audio or video to @potok_now_bot on Telegram and the text comes back in the chat.
Open @potok_now_bot in Telegram