← Back

Play Codec 2 speech using the <audio> tag

Codec 2 is a very-low-bitrate speech codec — 700 bit/s to 3200 bit/s — used mostly in amateur digital voice. Ten seconds of speech fit in under 2 Ko. Decoded by libcodec2_1. A .c2 file opens with a seven-byte header naming the mode; headerless .bin streams say nothing about which mode they use and are refused rather than guessed at.

Code snippet

<audio is="universal-audio_1" src="testcard.c2" using="solver_minimal_1"
        with="libcodec2_1" controls> </audio>

Specifications :

The specifications of the test sequence are :

Format Codec 2 (mode from the file header), 8 kHz mono, 10 s
FileSize 1.7 Ko
Solver solver_minimal_1