Codec2 neural enhancer tests

To keep the post short, I will only focus on what kind of work has been done so far and provide a few samples for your judgment.

Rationale: we often hear that Codec2 does not sound good, or that it is “no better than other DV modes”, or plain “analog FM sounds better”. Well – sure, Codec2 might not really offer anything better than AMBE/IMBE in the technical sense – all of these vocoders are based on LPC and simple glottal excitations. They sometimes perform better, sometimes worse. A solution to that, while keeping the whole M17 protocol intact, is to change how the speech is reproduced at the receiver.

Motivated by earlier research conducted by Felix Schäfer (DD8SF) – Applications of Neural Vocoding Techniques in Amateur Radio (as presented at the M17 Conference 2025), I decided to train a full GAN network using a LibriSpeech corpus (English). Thank you very much for the groundwork in this field. I decided to pick FARGAN as the reference approach, and apply it onto Codec2-mod, 3200bps mode. Codec2-mod has been selected because it is much more computationally efficient than the reference Codec2 implementation written by David Rowe, VK5DGR, et al. The last step of the FARGAN approach has been intentionally omitted for now (additional fine-tuning with low learning rate).

The idea is this: at the receiver-side, take the Codec2 frame parameters (simply tap in) and pass them to a neural speech synthesizer, instead of the one provided by Codec2. This way the bitstream transmitted over RF stays the same for every M17 user. The only thing that changes is that you can choose the speech synthesizer – the one provided by Codec2, or the neural-network-based one. This enhances the sound quality on your side only. The only limitation is that it requires some computational power, and therefore can not be executed on a plain STM32 (OpenRTX targets). To put it simple – the enhancer works on top of Codec2, without changing or modifying anything else. It can be ran in realtime on smartphones and PCs (vide: DroidStar, mvoice, etc.) at very little CPU cost.

Audio samples, starting with the source recording:

Reference input audio, sampled at 16kHz

The sample below is more or less what the microphone would pick up at the transmitter side.

Reference input audio, resampled at 8kHz

And this is roughly how M17 sounds today. Plain Codec2, 3200bps:

The 8kHz audio sample, Codec2-encoded

The next two files show how FARGAN behaves when it is used as a replacement to Codec2’s synthesizer.

FARGAN-based synthesizer, 8kHz
FARGAN-based synthesizer, 16kHz

The 16kHz sample shows how the network reconstructs the missing spectral information from the available 8kHz of bandwidth. The bitstream stays the same – 3200bps.

The next step is to bring the finely-tuned enhancer and perform some adversarial training and apply it to the output to, hopefully, make it sound even better and less metallic. After that, I might want to try it on top of DroidStar to see how it works with real Codec2 bitstreams.

Comments are welcome.

Comments

2 responses to “Codec2 neural enhancer tests”

  1. […] M17 Project’s October 13, 2026 post on Codec2 neural enhancer tests is relevant because it points to ongoing work on improving the perceived quality of Codec2-decoded […]

  2. […] M17 Project’s October 13, 2026 post on Codec2 neural enhancer tests is relevant because it points to ongoing work on improving the perceived quality of Codec2-decoded […]

Leave a Reply

Your email address will not be published. Required fields are marked *