drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
206 stars 52 forks source link

Support for Codec2 450 bit/sec mode #132

Closed tmiw closed 3 years ago

tmiw commented 3 years ago

Got a request for this via email. From http://www.rowetel.com/wordpress/?p=6212 and looking in the Codec2 tree, it seems that some demo code did exist at one point to encode and decode audio using that mode and the code in the paper was merged into drowe67/codec2. However, I'm not sure how much additional work would be needed for it to be usable by end users (or whether support should even be included), so I'm creating this issue to triage it.

drowe67 commented 3 years ago

Hi @tmiw - support for 450 bits/s exists in codec2 using c2enc/c2dec:

./src/c2enc 
usage: c2enc 3200|2400|1600|1400|1300|1200|700C|450|450PWB InputRawspeechFile OutputBitFile [--natural] [--softdec] [--bitperchar] [--mlfeat f32File modelFile] [--loadcb stageNum Filename] [--var] [--eq]
e.g. (headerless)    c2enc 1300 ../raw/hts1a.raw hts1a.bin
e.g. (with header to detect mode)   c2enc 1300 ../raw/hts1a.raw hts1a.c2

Or perhaps OP asking for a FreeDV mode that uses this codec 2 mode? That would be a significant amount of work, e.g. waveform design, FreeDV API integration. If a similar FEC code rate to 700D/E is applied, it might work at 10*log10(700/450)= 1.9dB better - not a huge gain.

To date I haven't had any reports from people using this codec 2 mode for real world application. The speech quality is quite low and I'm not sure if it would usable for real world QSOs. But this is experimental radio, so would be interesting to try, if someone wants to work on it :slightly_smiling_face:

tmiw commented 3 years ago

@drowe67, yep, a FreeDV mode based on the Codec2 one. I figured it'd be a significant effort but it doesn't hurt to put it out there for any future contributors who want something to do. :)

In any case, a few of the samples in the blog post were extremely difficult to understand, honestly. If a FreeDV mode based on it were to be implemented, I imagine it'd be a "last resort" type thing for when even 700D fails.

drowe67 commented 3 years ago

The ability to understand speech is the product of the zero-error speech quality plus distortions introduced by bit errors. If you are starting out with a low quality, it tends to be less robust to errors. So hard to say if the result would be a mode that works at lower SNRs.

Having said that, I have been experimenting with some ideas related to the 700 and 450 bit/s mode, in particular making the amplitude quantiser more robust to filtering/EQ of the input speech which tends to vary from user to user.

I'll close this issue as it's more a discussion about potential experimentation than an actual issue.