morseformer v0.6.4

Morse code, decoded by a transformer.

morseformer listens to a CW signal and writes down what it hears — on your own machine, in real time, on a plain CPU.

It is the first open-source Morse decoder built on a Conformer + RNN-T model, with a language model that knows amateur-radio idioms (callsigns, Q-codes, CQ DE … K). Apache 2.0.

20 WPM
600 Hz
15 %

This is the browser keyer: it turns your text into a CW tone so you can hear what the decoder works with. The decoder itself runs on your computer — pip install morseformer below.

Install and decode in two commands

Decode a recording. The first run downloads the model from Hugging Face; no GPU is needed.

$ pip install morseformer
$ morseformer decode my_recording.wav

Listen to a receiver live (PulseAudio input):

$ pip install "morseformer[live]"
$ morseformer live

No Nvidia card? Install the CPU build of PyTorch first and save about 4 GB of download.

$ pip install --index-url https://download.pytorch.org/whl/cpu torch torchaudio
$ pip install morseformer

Python 3.10 – 3.13. Linux, macOS and Windows. morseformer --help lists every subcommand.

--preset liveDefault. Balanced thresholds for a typical band.
--preset proseLM fusion + word splitter for ragchew and text: DROMCHRIS becomes DR OM CHRIS.
--preset contestLooser timing for fast exchanges.
--preset conservativeTighter thresholds for very noisy bands.

Measured on the air, not on synthetic audio

The v0.6.4 model was promoted after an audit of 26 hand-keyed ragchew recordings from two operators (31 minutes in total), decoded with the prose preset. One operator, g6pz, is held out of training entirely.

Metricv0.6.3v0.6.4Change
Character error rate, all clips26.98 %17.75 %−34 %
Word error rate, all clips70.34 %44.31 %−37 %
CER, g3ses20.56 %8.45 %−59 %
CER, g6pz (held out)34.46 %28.60 %−17 %

Every release must also pass a ten-category gate: prose and oratory clips, a callsign clip, a WebSDR FAV22-style clip, a contest guard, plus silence, word-gap and streaming-latency stress tests. Full history and known regressions are in the changelog.

How it works

Classic decoders (fldigi, MRP40, CW Skimmer) segment the signal with hand-tuned thresholds and fall apart in QRM, QSB and sloppy keying. morseformer treats the problem the way speech recognition does — but as character classification rather than word transcription — and learns timing from data. About 3.9 million parameters, small enough to run in real time on a laptop CPU.

  1. DSP front-endComplex band-pass filter centred on the carrier.
  2. Conformer encoder8 layers, d = 144, rotary attention, 4× time sub-sampling. Shared by both heads.
  3. Two headsCTC for frame-wise alignment and RNN-T for streaming output.
  4. Language modelOptional shallow fusion with a 482 KB amateur-idiom character 3-gram that re-segments run-on words.
  5. Text49-token vocabulary: letters, digits, punctuation, prosigns, and French É, À and apostrophe.

Training audio comes from a reproducible synthetic HF pipeline (morse_synth/: operator timing jitter, AWGN, QSB, QRN, drift, QRM) plus a forced-alignment-aware fine-tune on real hand-keyed audio. Details in the model card.