Mooneer’s FreeDV Update – January 2024

This month, freedv-gui got the following bug fixes and feature enhancements:

  • Fixed spelling, etc. mistakes in the documentation.
  • Updated Filter dialog to better handle resizing.
  • For the built-in FreeDV Reporter client in the application:
    • Fixed capitalization of distance/frequency units in FreeDV Reporter window.
    • Reviewed and merged a PR to adjust the text alignment and sizing of columns in FreeDV Reporter.
    • Fixed bug involving handling of invalid characters in grid squares.
    • Improved behavior of Send and Clear buttons for better usability.
    • Added operations to allow management of the saved message list.
    • Added guard code to prevent FreeDV Reporter window from being off screen on startup.
    • Enabled use of space bar for PTT when in the FreeDV Reporter window.
    • Added “heading” column (in degrees) to FreeDV Reporter window.
    • Added logic to prevent FreeDV Reporter window from being above the main window.
    • Fixed Windows-specific off by one issue in FreeDV Reporter sorting code.
  • Removed build support for 32-bit Windows on ARM.
  • Fixed a bug preventing startup on macOS versions older than 10.13.
  • Reorganized and cleaned up code and other files to improve maintainability.
  • Added CI build for macOS.
  • Fixed issue preventing TX audio from resuming after going from TX->RX in full duplex mode.
  • Fixed issue causing intermittent crashes when filters are enabled while running.
  • Prevented unnecessary recreation of resamplers in analog mode.
  • Added a Frequency column to the callsign list (at the bottom of the main window).
  • Improved handling of audio devices with high sample rates (>48000 Hz) and devices with more than two channels.
  • Fixed bug where PTT button background color doesn’t change when toggling PTT via space bar.
  • Fixed bug where FreeDV crashes if only RX sound devices are configured with mic filters turned on.

ezDV also got a minor firmware fix that clears any in-progress beeper messages before outputting new ones.

More information can be found in the commit history below:

(Note that all commit logs above were generated with the following command line:)

git log --author="member@email" --after "Month 1, 2024" --before "Month 31, 2024" --all > commit.log

Another successful Orlando HamCation

This year, the FreeDV project shared a booth with the M17 project at the Orlando HamCation. Mel Whitten (K0PFX) and Mooneer Salem (K6AQ) both explained and demonstrated the FreeDV software, ezDV and the SM1000. Below is a photo of the booth before the show opened:

Additionally, Mooneer Salem gave a talk on Friday about FreeDV. (For those who were unable to make it, the slide deck for this talk can be found here.)

Hope to see you at future hamfests (and hear you on the air!) And thank you to Bruce Perens and HamOpen.org for hosting the booth space for FreeDV as well!

FreeDV is Hiring a DSP Engineer!

The FreeDV project is looking to hire a DSP engineer! This person will be responsible for helping to develop the next generation of open source HF digital voice. Funding for this opportunity will be provided by the ARDC grant awarded to the project (thank you again!)

More information about this opportunity can be found here.

FreeDV at HamCation 2024

For those of you who are going to HamCation in Orlando, FL this weekend, FreeDV will be there at booths 64 and 65 (along with the M17 project). Additionally, Mooneer Salem (a developer and one of the members of the FreeDV Project Leadership Team) be giving a talk about FreeDV at 10:45am on Friday in CS2. Hope to see you there!

(More info about HamCation at https://www.hamcation.com/ if interested.)

FreeDV v1.9.8 released

This release contains the following content:

  1. Bugfixes:
    • Prevent unnecessary recreation of resamplers in analog mode. (PR #661)
    • Better handle high sample rate audio devices and those with >2 channels. (PR #668)
    • Fix issue preventing errors from being displayed for issues involving the FreeDV->Speaker sound device. (PR #668)
    • Fix issue resulting in incorrect audio device usage after validation failure if no valid default exists. (PR #668)
    • Fix bug where PTT button background color doesn’t change when toggling PTT via space bar. (PR #669)
    • Fix bug where FreeDV crashes if only RX sound devices are configured with mic filters turned on. (PR #673)
    • Fix Windows-specific off by one issue in FreeDV Reporter sorting code. (PR #681)
  2. Enhancements:
    • Add Frequency column to RX drop-down. (PR #663)
    • Update tooltip for the free form text field to indicate that it’s not covered by FEC. (PR #665)
    • Enable use of space bar for PTT when in the FreeDV Reporter window. (PR #666)
    • Move TX Mode column to left of Status in FreeDV Reporter window. (PR #670)
    • Add heading column to FreeDV Reporter window. (PR #672#675)
    • Prevent FreeDV Reporter window from being above the main window. (PR #679)
    • Add support for displaying cardinal directions instead of headings. (PR #685)
  3. Code cleanup:
    • Move FreeDV Reporter dialog code to dialogs section of codebase. (PR #664)

More information and download links can be found here.

Davids FreeDV Update Jan 2024

This month I’ve been trying to apply Machine Learning (ML) techniques to quantise Codec 2 features.

At low bit rates, Codec 2 [1] sends a smoothed version of the speech spectrum, that is represented by 20 spectrum samples, which is updated every 10-40ms. The first sample covers 200-300 Hz, the second 300-450 Hz, up to the last sample at 3700 Hz. These 20 spectral samples are grouped together into a vector, or in ML-speak “features”, that we need to somehow send over the radio channel.

Here is a 3D plot of those 20 samples, plotted over 250 frames (2.5 seconds) of time. The Y axis is amplitude in dB. Turns out that adjacent samples are similar, (or correlated) along both the time and frequency axis.

The key advantage of ML over classical DSP is it can find linear and non-linear correlations, leaving us less information to transmit over the channel. If there is less information, then we require less bits for a given speech quality level.

I worked in two stages. First I built a simple autoencoder than reduced the number of Codec 2 features that needed to be quantised from 20 to 10. This means the ML network has worked out how to reduce the amount of information by about half. It does this by working out that some of the adjacent samples are similar, so we only need to send the information common to both of them. I then applied Vector Quantisation (VQ) to quantise the dimension 10 vectors, and obtained reasonable speech quality at 24 bits/frame. I’ve documented the work in [2], including lessons learned.

The following three samples show a single sample after passing through each processing stage. The idea is to have minimal change between each sample. In the final sample we have quantised the speech spectrum with 24 bits/frame. If we send the 24 bits/frame over the channel every 20ms this would result in 24/0.02 = 1200 bit/s.

Dimension 20 Vector
Autoencoder Dimension 10
Autoencoder Dimension 10 and 24 bit/s frame Vector Quantiser (VQ)

These techniques could be used to build an improved quality Codec 2 mode in the 1200-2400 bit/s range. As a next step I’d like to work out how to include the pitch and voicing information in the same vector, and take advantage of correlation across time, which might lead to techniques applicable for even lower bit rates.

Towards the end of the month, I started to investigate the latest LPCNet technology (a high quality ML vocoder), and how it can be applied to our goal of high quality speech over HF radio channels. There has been some interesting work in LPCNet quantisation [3], that may be useful for HF radio. To explore this I’ve kicked off a feasibility study, and have built up a PC with a RTX4090 GPU card, as it requires some serious ML resources for training.

[1] Codec2
[2] ML Quantisation of Codec 2 Features
[3] Low-Bitrate Redundancy Coding of Speech Using a Rate-Distortion-Optimized Variational Autoencoder