Skip to content

Client-side DSP roadmap: CW decode, FT8, voice squelch, resampling, and more #85

Description

@ten9876

Client-Side DSP Algorithm Roadmap

Research into open-source DSP algorithms that would complement our existing client-side processing (NR2 spectral noise reduction, RN2 RNNoise neural suppression). All recommendations are permissively licensed (MIT/BSD) unless noted.


Phase 1 — Foundation (improve what we have)

r8brain-free-src — High-quality audio resampler (MIT)
https://github.com/avaneev/r8brain-free-src

Header-only C++ library for arbitrary-ratio sample rate conversion. Would replace the hand-rolled linear interpolation in RNNoiseFilter (24kHz ↔ 48kHz). Professional audio quality, thread-safe, low latency.

SpeexDSP resampler (BSD-3) is an alternative: https://github.com/xiph/speexdsp


Phase 2 — Smart squelch

libfvad — WebRTC Voice Activity Detection (BSD-3)
https://github.com/dpirch/libfvad

Standalone VAD extracted from WebRTC. Returns voice/no-voice per 10-30ms frame at 8/16/32/48 kHz. Four aggressiveness modes. Would enable a "voice squelch" that opens on speech rather than raw signal power — significantly better for SSB monitoring where carriers and key-up noise currently trip the squelch.

SpeexDSP (BSD-3) also includes VAD plus acoustic echo cancellation (prevents monitor audio feeding back into TX).

PA3FWM spectral tilt squelch — not a library but a well-documented algorithm. Compares power in 200-600 Hz vs 1000-1500 Hz bands. Speech has more low-frequency energy; noise is flat. Opens only for voice, not carriers. Could be implemented in ~50 lines. Reference: https://pa3fwm.nl/technotes/tn16e.html


Phase 3 — CW decode

ggmorse — Real-time Morse code decoder (MIT)
https://github.com/ggerganov/ggmorse

By the author of llama.cpp/whisper.cpp. Pure C/C++, no dependencies. Automatic frequency detection (200-1200 Hz), speed detection (5-55 WPM), real-time decoding from raw audio. Used by SDRangel for its Morse decoder plugin.

Could display decoded text as an overlay on the spectrum/waterfall or in a dedicated panel. Lightweight enough to run per-slice.


Phase 4 — FT8/FT4 decode

ft8_lib — Standalone FT8/FT4 decoder (MIT)
https://github.com/kgoba/ft8_lib

Lightweight C implementation. Runs in under 200 KB RAM. Could decode FT8/FT4 and display callsigns/grid squares directly on the waterfall without requiring WSJT-X as a separate application. Would complement (not replace) the existing rigctld CAT integration for operators who want full WSJT-X control.


Phase 5 — TX audio processing

sndfilter — Compressor + biquad filters (0BSD / public domain)
https://github.com/velipso/sndfilter

Dynamic range compressor (from Chromium), biquad filters (lowpass, highpass, bandpass, notch, peaking, shelving). The compressor is directly useful for TX audio processing — speech compression before transmission to maximize average power without clipping. Biquad filters enable TX/RX audio shaping and de-hum (notch at 50/60 Hz + harmonics). Code prioritizes readability. Zero-restriction license.


Phase 6 — Headphone comfort

BS2B — Bauer stereophonic-to-binaural crossfeed (MIT)
https://bs2b.sourceforge.net/

Crossfeed filter that mixes a delayed, filtered version of each stereo channel into the opposite ear. Reduces "superstereo fatigue" from extended headphone listening. Many ham operators use headphones for hours — this makes stereo RX audio significantly less fatiguing. Implementation is just a pair of IIR filters.


Phase 7 — Comprehensive DSP toolkit

liquid-dsp (MIT)
https://github.com/jgaeddert/liquid-dsp

Full SDR DSP library with zero external dependencies. Includes AGC (multiple algorithms), adaptive filters (LMS, RLS), FIR/IIR filter design, polyphase resampling, modem/demod (PSK, QAM, FSK, GMSK, OFDM), FEC (Hamming, Golay, Reed-Solomon, convolutional), NCO, equalizers, and more. MIT licensed, designed for embedded/real-time use. This could become the backbone for future digital mode and signal processing features.


Also considered (GPL — would need process isolation)

Algorithm What License Repo
Fldigi CW decoder Bayesian + SOM neural CW decode GPL-2 sourceforge.net/projects/fldigi
libspecbleach Spectral gating with transient protection (good for CW) LGPL-3 github.com/lucianodato/libspecbleach
UHSDR/DD4WH spectral NR Ephraim-Malah with SPP, tuned for HF GPL-3 github.com/df8oe/UHSDR

Summary

Phase Feature Library License Effort
1 Quality resampling r8brain-free-src MIT Small (header-only drop-in)
2 Voice-aware squelch libfvad / SpeexDSP BSD-3 Medium
3 CW decode ggmorse MIT Medium
4 FT8/FT4 decode ft8_lib MIT Large
5 TX compression sndfilter 0BSD Small
6 Headphone crossfeed BS2B MIT Small
7 DSP toolkit liquid-dsp MIT Ongoing

Metadata

Metadata

Assignees

No one assigned

    Labels

    audioAudio engine and streamingdependenciesPull requests that update a dependency fileenhancementImprovement to existing featurehelp wantedExtra attention neededpriority: lowLow priority

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions