David’s FreeDV Update – April 2024

Breakfast on the Nullarbor Plain

This month I took a vacation, so less work that usual on FreeDV. I traveled by road from my home in Adelaide to Western Australia (WA), reaching the South-Western tip of Australia, about 3000km away. South Western WA is a lovely part of the country, and the trip included the adventure of crossing the 1200km Nullarbor plane (translated: no trees).

But back to the business of HF digital voice. Given the encouraging results from our initial Radio Autoencoder (RADAE) over the air (OTA) tests, we have expanded our program of testing to include Hams from different countries. It takes a lot of work to develop a new speech communication system , so it’s important to validate the design as early as possible. Much smarter to do this in the current simulation form, rather than put in ten times the work on a real time implementation, release it, and find out it falls over in a common use case. This is experience talking – we’ve learned many lessons after a decade of FreeDV development.

So we are testing the prototype RADAE design using crowd sourcing. I have approached several Hams for help in testing RADAE signals over their local radio channels and in different languages. They provide me with a 10s speech sample in their language, I send them back a file of RADAE samples that they can transmit over the air. The received RADAE signal is recorded off air by them (e.g. using a KiwiSDR), we then decode and evaluate. This is all done in non real time using stored files being emailed back and forth.

In particular I would like to thank Kanda JH0PCF, Yuichi JH0VEQ, and Simon DJ2LS for your help. Some take aways:

  1. RADAE works well in Japanese and German, as well as English.
    It handles Near Vertical Incidence Skywave (NVIS) channels quite well. This is typical of local (several hundred km) HF communication in countries like Japan and the UK. The signal goes straight up and straight down.
  2. However on the samples tested so far, RADAE is falling over with long distance (e.g. Japan to Australia) communications, so some more work required there.
  3. The speech quality is competitive with SSB at high and low SNRs, however we need a better way to measure the actual SNR of off air signals to “calibrate” the results. So I need to hit the math on that one to develop a suitable algorithm.

Some comments from the test team:

I listened to the voice that was replied. RADAE has no problem with Japanese demodulation. In fact, I feel that RADAE’s demodulated audio is easier to hear than SSB. I thought the sound quality was close to the 2020 mode implemented in the current version. It’s a strange feeling to be able to experience FM mode quality audio with SSB. (Kanda, JH0PCF)

It feels, if we can hear SSB clearly, then RADAE also works, but as soon as we are coming closer to the edge of ability of hearing SSB, also RADAE struggles. But the radae output is really nice, much better voice output compared to SSB. Using your last example, I first thought, you’ve send me the default audio example (ie source sample), so yes, its really nice. (Simon, DJ2LS)

Here is a example from Kanda at low SNR

Kanda JH0PCF, 20W, received by Tokyo KiwiSDR (SSB)

Kanda JH0PCF, 20W, received by Tokyo KiwiSDR (RADAE)

The two signals are transmitted one after the other, so get (more or less) the same channel conditions. The spectrogram below shows (left to right) the sine wave tone, SSB, then RADAE. Note about half the RADAE signal is wiped out at the start, but it seems to sound OK.

Here’s a medium SNR (8dB-ish) sample from Simon, DJ2LS, over a 1100km path at about 10W peak (1-2W RMS):

SSB
RADAE

Yuichi performed a couple of novel experiments that I hadn’t thought of. Here is RADAE compared to existing FreeDV modes, transmitted a few seconds apart, so over more or less the same channel at roughly the same power. SNRs are around 8dB.

SSB
RADAE
FreeDV 2020B
FreeDV 700E

Unfortunately 2020B didn’t sync on this channel/SNR. I feel the 700E sample could possibly be improved (e.g. levels, microphone, filtering), but it does illustrate the problems with current FreeDV modes – the speech quality borders on the lower level required for communication and it can be a struggle to get consistent results. This is something we have recognized and are attempting to address with our ARDC funded R&D program.

As a fairer comparison, here is the sample used for RADAE testing passed through a FreeDV 700E simulation with no channel errors:

Project Plan Pivot

Given the encouraging results with RADAE, we’ve pivoted our ARDC project plan to focus on RADAE, and have paused development of Codec 2 and FreeDV modes. RADAE appears to be our strongest candidate for satisfying the top three goals we set for ourselves when applying for the ARDC grant:

  1. Improve speech quality to a level comparable to commercial codecs.
  2. Develop a “rag chew” FreeDV mode with subjective speech quality comparable to SSB at high SNRs.
  3. Improve low SNR operation such that FreeDV is superior to SSB over poor HF channels.

We are on track to meet (and indeed exceed) the first two goals, but I think the final goal has yet to be demonstrated (e.g. SSB and the current incarnation of RADAE fall over at roughly the same SNR). There are a few bugs and many practical issues to work through before we have a real world version of RADAE that anyone can use. Plus there will be a few “gotchas” we haven’t thought of yet. Plenty for me to do in the coming months!

I’ve also been working on HF data modem software with Simon from the FreeDATA project. In next months report we hope to present a new FreeDATA release incorporating this work, resulting in a significant boost in FreeDATA performance.

Mooneer’s FreeDV Update – March 2024

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

  • Fixed minor memory leak involving FreeDV Reporter window.
  • Fixed issue causing delayed updates when modifying FreeDV Reporter filters.
  • Added support for unlimited length reporting messages in FreeDV Reporter.
  • Added additional error reporting in the event of PortAudio failures.

ezDV also got the following changes:

  • FreeDV Reporter:
    • Fixed issue preventing auto-reconnection to FreeDV Reporter when connection is lost.
    • Fixed issue causing crash if FreeDV Reporter connection exists and Wi-Fi goes down.
    • Added reporting message functionality to FreeDV Reporter implementation.
    • Lowered priority of FreeDV Reporter task.
  • FlexRadio support:
    • Fixed bug when user audio mixes with radio audio during TX.
    • Optimized sample rate conversion to use fixed-point math and ESP32S3 SIMD instructions to reduce CPU usage.
    • Updated audio packet sending logic to reduce audio dropouts during TX and RX.
    • Updated audio scaling logic so that 100% in SmartSDR equals 100 watts of power
    • output.
  • Upgraded project to ESP-IDF 5.2.1.
  • Fixed typos preventing failure popup from disappearing in web UI.
  • Made changes to avoid unnecessary commits to NVS flash when settings haven’t changed.
  • Created user manual and added infrastructure to automatically build it and firmware when releasing new versions.
  • Changed default FreeDV mode to 700D on initial startup.
  • Updated HTTP serving logic to reduce likelihood of failed transfers.
  • Added logic to preload voice keyer data during transmit to reduce latency.
  • Fixed bug causing sync LED to remain lit when switching to analog mode.
  • Refactored DVTask and DVTimer to enable more easily readable stack traces in case of crashes.
  • Added 250ms hard timeout when stopping TX to prevent the radio from being stuck in transmit.

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

FreeDV v1.9.9.1 released

This release contains the following content:

  1. Bugfixes:
    • Cache PortAudio sound info to improve startup performance. (PR #689)
    • Fix typo in cardinal directions list. (PR #688)
    • Shrink size of callsign list to prevent it from disappearing off the screen. (PR #692)
    • Clean up memory leak in FreeDV Reporter window. (PR #705)
    • Fix issue causing delayed filter updates when going from tracking band to frequency. (PR #710)
    • Fix hanging issue with footswitch configured. (PR #707)
  2. Enhancements:
    • Add additional error reporting in case of PortAudio failures. (PR #695)
    • Allow longer length user messages. (PR #694)
    • Add context menu for copying messages to the clipboard. (PR #694)
  3. Documentation:
    • Remove broken links in README. (PR #709)
  4. Build system:
    • Add ability to build without LPCNet in preparation for potential future deprecation of 2020/2020B. (PR #711)

More information and download links can be found here.

Note: v1.9.9.1 has been released due to a Windows-only bug caused by PR #689. This PR has been partially reverted in PR #712 and this post subsequently edited to point to the new release.

David’s FreeDV Update – March 2024

This month was spent building up the “classical” DSP support code around the Radio Autoencoder, so I could test it over the air using real radio signals. Can we repeat the impressive low SNR results from simulation over real radio channels? This meant coding up an OFDM modem in PyTorch, lots of testing, and a bunch of support scripts to drive the radio hardware.

The algorithms we developed last year on improving FreeDV acquisition and designing filters came in handy, especially at the low SNRs required for this work.

The first test was “over the cable” (OTC) at VHF (144.5 MHz) using a HackRF transmitter, switchable attenuator as the “channel”, and a RTLSDR as the receiver. The noise (N) is injected by the physical properties (noise figure) of the RTLSDR receiver, so the S/N is controllable by the level (S) presented by the switchable attenuator. My calculations indicated it should work around the -135dBm level, and sure enough it did – sounding just like the simulations (see Feb 2024 for examples). This was a great confidence boost as it’s hard to argue with real world noise, but easy to mess up the calibration of noise simulated by software.

For comparison a narrow band FM signal will fall over at around -120dBm, and a first generation digital VHF radio (using proprietary speech codecs) perhaps a few dB lower. Although to be fair the digital VHF systems also transmit ancillary digital data at the same time, which consumes some of their power and bandwidth.

Radio Autoencoder VHF signal on my spectrum analyser – getting hard to measure as it’s close to the noise floor of the spec-an

Next step was HF radio, a somewhat tougher channel. This required quite a bit more work on the OFDM sync algorithms, but eventually I was ready to transmit a signal using my HF radio. I sent a 5W signal over a 500km HF path to a KiwiSDR, and passed the received signal through the Radio Autoencoder system. Much to my surprise, it worked first time! Good quality audio over several different paths and channel types, up to 2000 km away. It seems quite robust to the channels I have tested so far, including NVIS, EMI corrupted receivers, and SNRs below 0dB.

Plot of test signal sent over HF radio – a sine wave tone, compressed SSB, Radio Autoencoder signal. All signals have the same RMS power.
Sine wave header and compressed SSB received over a 475km HF path
Radio Autoencoder signal received over the same 475km HF path
Spectrogram of received signals over a 30km Near Vertical Incidence (NVIS) path – chosen as the fading is pretty bad when the ground and sky wave mix. Note the “barber pole” effect on the Radio Autoencoder signal RHS.

These are encouraging results for the Radio Autoencoder. I’m now pondering next steps. I think it makes sense to test the system with some more samples and over different channels. Also, at some point we need a C port so this can be used in real time by anyone.

FreeDATA Update

Part of our ARDC grant activities is to support the FreeDATA project. Simon and team have recently completed a major re-write and FreeDATA is back on the air. This month I’ve been working with Simon on a faster modem waveform for “ACK” packets, that will help speed up the FreeDATA protocol. I’m also pleased to see FreeDATA working over real HF channels, including this 7 hour 1.44Mbyte file transfer over an 800km path.

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.)