← Back

Play iLBC speech using the <audio> tag

iLBC (RFC 3951) is a narrowband speech codec built for packet loss: every frame decodes on its own, so a lost one costs exactly one frame and nothing after it. This demo uses libilbc_1, which packages WebRTC's fixed-point implementation. The file opens with a nine-byte header naming the mode — 20 ms frames of 38 bytes here — and the filter reads it rather than guessing, since 38 and 50 bytes divide too many stream lengths for a guess to be safe. Being fixed-point, the decode is bit-exact: not one sample of 80 160 differs from the same library built natively.

Code snippet

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

Specifications :

The specifications of the test sequence are :

Format iLBC 20 ms mode (15.2 kbit/s), 8 kHz mono, 10 s
FileSize 19 Ko
Solver solver_minimal_1