Voice FEC

This is something that I have been pondering.

Currently M17 uses a punctured convolution code for the audio segment of the transmission, this includes a checksum to check the integrity of the audio. This way you get all or nothing audio. However I think this will lead to sub optimal performance in weak signal conditions.

DVSI AMBE and IMBE use Golay (and Hamming) block coding, as well as some bits that have no FEC at all. This is important for a number of reasons. Firstly it means that you can easily get a BER value for the audio blocks. The codec used for DMR has rules put in place by DVSI that specify what BER is allowable on which FEC blocks before the audio is regarded as unrecoverable and should be silenced. This is why DMR (and NXDN and System Fusion DN mode) don’t suffer from “R2D2” like D-Star whose codec has no such rules.

What it also says is that these codecs can stand a certain amount of corruption before the audio is regarded as unusable, and practical use of these codecs bears this out.

I am sure that the Codec2 codecs can also stand a certain amount of corruption before they are unusable. Maybe some bits don’t even need FEC as their effect on the audio is minimal. Would it not be better to speak to the developer of the Codec2 and find out how the bits are organised and use targeted block FEC rather than the current all or nothing approach?

Even if the block FECs aren’t as powerful as the convolution FEC in terms of bit errors, they would allow for decoding to lower signal strengths, allbeit with slightly corrupt audio. The human ear is a wonderful thing and shouldn’t be underestimated.

You’d also gain 16-bits each frame because of the loss of the checksum :slight_smile:

Jonathan G4KLX

Codec2 seems to do OK with a few bit errors here or there.

Using my example modulator/demodulator as a test bed, with an SNR of 6dB and BER of 0.01 the Viterbi decoder was able to recover most of the frames, and a few frames did not have a valid CRC. All frames were fed into the Codec2 decoder. The impact to the audio was not noticeable. So the idea that you get “all or nothing” is a false premise.

It appears that there are ways to estimate BER from the Viterbi path: https://www.dsprelated.com/showthread/comp.dsp/47596-1.php

The BER at which Codec2 should be silenced can be determined empirically.

One simple heuristic for which frames to silence could be: any frame with an invalid checksum, and known bit errors in the frame number and/or sync word. We know what 32 of the bit values in a frame should be.