Mooneer’s FreeDV Update – February 2024

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

  • Added support for displaying cardinal directions (e.g. N/S/E/W) instead of headings in degrees.
  • Improved audio device detection performance when using PortAudio by caching device info.
  • Shrink height of received callsign list on main window to keep it from going off the screen.

ezDV also got the following changes:

  • Lowered AGC target level to prevent OVL LED from unnecessarily flashing on RX.
  • Disabled LED blinking in fuel gauge mode due to low reliability.
  • Added glitch filter to GPIOs to prevent unintended toggling.
  • Improved reliability of Icom radio support in congested Wi-Fi environments.
  • Fully refresh web UI after ezDV comes back from being rebooted (intended to ensure user gets any HTML/JS changes as part of a firmware update).
  • Fixed bug preventing Wi-Fi scan from actually stopping when user switches away from Wi-Fi tab on web UI.
  • Don’t remove Wi-Fi networks from the network list if they don’t appear in a subsequent scan.
  • Build system: adjusted copyright date in web UI based on firmware build date.
  • Default radio port to 50001 to match Icom defaults.
  • Cleaned up compiler warnings in code.
  • Fixed crash if Wi-Fi goes down during a network scan.
  • Build system: use official Codec2 release instead of codec2-dev.
  • Refactored USB power detection so that it’s more resilient to missed interrupts.

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

David’s FreeDV Update Feb 2024

This month I’ve been working on a feasibility study using an autoencoder derived from RDOVAE [1], based on code originally written by Jean Marc Valin and Jan Büthe for an Opus application. The goal is to see if we can send good quality speech over HF multipath channels at low SNRs.

The autoencoder takes as input a typical set of vocoder features (short term spectrum, pitch, voicing), then applies time based prediction and transforms to arrive at a small number of parameters that can be sent over a channel. This is similar to an old school vocoder that uses classical DSP, except Machine Learning (ML) allows us to learn non-linear transforms and prediction, which tend to be more powerful.

Usually, after the transformation/prediction stage we then quantise to a low bit rate, then use Forward Error Correction (FEC) and modems to send the bits over a channel. However this latest work takes a novel twist – we train the autoencoder to generate PSK symbols that we send over the channel. It effectively combines quantisation, channel coding, and modulation. The symbols tend to cluster around +/-1 like BPSK but are continuously valued. So it’s like a discrete time, continuously valued (analog) PSK.

Scatter Plot showing the signal constellation from the Radio Autoencoder, with symbols mapped to two dimensions like QPSK. Unlike conventional PSK, they are continuously valued.
A 3D scatter plot makes the picture clearer. Most symbols are at the +/- 1 points – the network has learned that in the presence of noise, these are the best points.


This month I’ve been building up the code required to test the idea over multipath (HF) channels. This mean reshaping the PSK symbols into an OFDM modem frame, and adding a multipath simulation. The initial results are encouraging, with speech quality better than any existing FreeDV mode, and competitive with SSB at low SNRs. At high SNRs the quality is also quite good, better than analog FM.

Simulated SSB with compressor at -3dB SNR on an AWGN channel.

The Radio Autoencoder at -3dB SNR on an AWGN channel.

Spectrogram of received signal at -3dB SNR, the autoencoder output has been mapped to an OFDM signal about 1000 Hz wide.

However this is all early days. To expedite answering the key questions, the current simulation ignores a lot of real world issues like acquisition, phase, frequency and timing offset correction. I reasoned that we have classical DSP solutions to these problems that work pretty well, so instead I focused on multipath performance as experience has shown that is the toughest issue with HF digital speech.

The ML code used for training includes a channel model. As an experiment, I added a saturating HF power amplifier model. The output was an OFDM modem waveform with a 1dB Peak to Average Power Ratio (PAPR), which is an excellent result. Our FreeDV waveforms run at around 4.5 dB, and SSB with a good compressor 4-6dB.

ML systems tend to work well until they experience conditions outside what they have been trained for. So I’m taking small steps, and planning to test a variety of channel impairments one by one, looking for that “ML gotcha”. I’m also spending way to much time checking my channel model calculations – handling the shift from digital PSK to analog has taken some careful thought and is a bit mind bending after 35 years of work in digital PSK!

The next step is to build up acquisition and synchronization code, and get to a point where we can send and receive signals over real RF channels. I’ll start with an Over The Cable (OTC) test on the bench, and work up to the point where we can play stored files over real HF channels.

[1] J.-M. Valin, J. Büthe, A. Mustafa, Low-Bitrate Redundancy Coding of Speech Using a Rate-Distortion-Optimized Variational Autoencoder, Proceedings of International Conference on Acoustics, Speech, and Signal Processing (ICASSP), 2023.

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



FreeDV v1.9.7.2 released

This release actually fixes what v1.9.7.1 was supposed to. Sorry for the inconvenience. Assuming no other serious crash-type bugs, we should hopefully be back to the usual release cadence (~1x/month or so).

More information and download links here.

FreeDV v1.9.7.1 released

Due to an intermittent crash discovered immediately after v1.9.7’s release, v1.9.7.1 has been released. The crash is related to the filter functionality; when the TX or RX filters are modified, an assertion failure occasionally gets thrown because the old filters aren’t fully deleted by the time the new filters need to be created.

More information and download links for this hotfix release can be found here.