Codec 2
David Rowe, VK5DGR
Introduction
Codec2 is an open source low bit rate speech codec designed for communications quality speech at 2400 bit/s and below. Applications include low bandwidth HF/VHF digital radio and VOIP trunking. Codec 2 operating at 2000 bit/s can send 32 phone calls using the bandwidth required for one 64 kbit/s uncompressed phone call. It fills a gap in open source, free-as-in-speech voice codecs beneath 5000 bit/s and is released under the GNU Lesser General Public License (LGPL).
The motivations behind the project are summarised in this blog post.
You can help and support Codec2 development via a Donation.
Status
Alpha release. V0.1A is the current SVN trunk version, a fully function 2550 bit/s codec (51 bits/frame at a 20ms frame rate). Work is in progress on a 1400 bit/s version in the codec-dev SVN branch. The target application for 1400 bit/s is digital voice over HF radio.
Here are some samples from the 2100 and 1400 bit/s versions. As you can hear, it’s possible to get about the same quality at 1400 bit/s as 2550 bit/s.
Codec | Male | Female |
---|---|---|
Original | male | female |
Codec 2 V0.1A 2550 bit/s | male | female |
Codec 2 2100 bit/s | male | female |
Codec 2 1400 bit/s | male | female |
Here is Codec 2 operating at 2550 bit/s compared to some other codecs:
Codec | Male | Female |
---|---|---|
Original | male | female |
Codec 2 V0.1 2550 bit/s | male | female |
Codec 2 V0.1A 2550 bit/s | male | female |
MELP 2400 bit/s | male | female |
AMBE 2000 bit/s | male | female |
LPC-10 2400 bit/s | male | female |
Notes: The MELP samples are from an early 1998 simulation. I would welcome any samples processed with a modern version of MELP. The AMBE samples were generated using a DV-Dongle, a USB device containing the DVSI AMBE2000 chip. The LPC-10 samples were generated using the Spandsp library.
Here is a counter example where AMBE really shines compared to Codec 2. In particular the low frequency reproduction is much better. Thank you Kristoff ON1ARF for sending in these samples. Why AMBE works so much better than Codec 2 for this sample compared to say the male sample above (hts1a.wav) is an interesting mystery that I am exploring. Input filtering perhaps? Or a corner case where the Codec 2 parameter estimators (pitch, voicing etc) break down? We shall see.
Codec | Kristoff |
---|---|
Original | Kristoff |
Codec 2 V0.1A 2500 bit/s | Kristoff |
AMBE 2000 bit/s | Kristoff |
Here are some samples with acoustic background noise, similar to what would be experienced when driving a truck. As you can see (well, hear) background noise is a tough test for low bit rate vocoders. They achieve high compression rates by being highly optimised for human speech, at the expense of performance with non-speech signals like background noise and music. Note that Codec 2 has just one voicing bit, unlike mixed excitation algorithms like AMBE and MELP.
Codec | Male with truck noise |
---|---|
Original |