Skip to main content

NeuroCW (Part 1): A Deep-Learning CW Decoder Built for −12 dB — Data, Model and DGX Spark Training

NeuroCW at a glance

Figure 1. NeuroCW at a glance. All CER numbers are from synthetic test sets.

▶ New: watch the first on-air test of the NeuroCW test build

NeuroCW is an end-to-end neural CW decoder: audio in, text out. One Conformer-CTC model copies English, Korean (Hangul) and Japanese (Wabun). It was trained for about two weeks on an NVIDIA DGX Spark, exported to ONNX, and a Windows release is planned for early November. This post walks through how it was built, mostly in pictures.

1. The problem

Classic decoders do fine on clean signals. They struggle once QSB, QRM and a human fist get involved. NeuroCW was trained on the bottom case.

Clean vs noisy CW

Figure 2. The same transmission, clean (top) and after the synthetic HF channel (bottom).

Pipeline

Figure 3. End-to-end pipeline: generator → spectrogram → Conformer → CTC text.

2. Synthetic data, generated on the fly

No dataset sits on disk. Every batch is generated fresh and is deterministic per seed. The text, the operator's fist and the radio channel are all randomized.

Text source mix

Figure 4. Language and text-source mix. Callsigns use real EN/KO/JA prefixes.

Keying styles

Figure 5. Three simulated key types, each with its own timing jitter, weight and rise time.

HF channel chain

Figure 6. The HF channel simulator. Percentages are the share of clips that get each impairment.

Real noise beds

Figure 7. Five real recorded band-noise beds (20 m, 40 m, CW band), cleaned of embedded CW.

Spectrogram gallery

Figure 8. Five generated training clips across languages, SNRs and fists.

3. Model

A 5 ms STFT frontend (156–1406 Hz) feeds 16 Conformer blocks. The model is trained with CTC plus two auxiliary losses: intermediate CTC and a key-up/key-down detector.

Model architecture

Figure 9. NeuroCW large: 384-dim, 16 layers, 6 heads, 55.3M parameters, 144-token vocab, greedy CTC decoding.

4. Training on a DGX Spark

Training starts easy and moves down into the noise. Ten runs took about 128 GPU-hours. The final model is the final checkpoint of run 10.

SNR curriculum

Figure 10. SNR curriculum: the lower limit slides from +5 dB to −20 dB over the first 25% of training.

Training runs

Figure 11. All 10 runs on one time axis, with each run's benchmark CER.

Training loss

Figure 12. Training loss across the run chain.

CER progression

Figure 13. Benchmark CER per checkpoint: 84.63% (first attempt) → 5.07% (final checkpoint).

5. Results

NeuroCW and DeepCW decoded the same 450 synthetic clips (machine keying + AWGN). The gap widens as the noise goes up.

Test setNeuroCW (final)DeepCW
Benchmark, all SNRs (450 clips)5.07%18.33%
Benchmark @ −12 dB10.18%52.24%
Realistic channel EN / KO / JA8.42 / 5.87 / 9.21%26.80 / — / —

Table 1. Character error rate (lower is better). DeepCW does not support Korean or Japanese.

Fairness note: the test clips come from the same family of simulator NeuroCW was trained on, so this setting favors NeuroCW. A real-air comparison comes with the Part 2 benchmark.

CER vs SNR

Figure 14. CER vs SNR. NeuroCW stays at or below 0.35% down to −8 dB.

CER by WPM and realistic

Figure 15. Left: CER by speed (12–40 WPM). Right: the realistic synthetic HF channel.

Keying weight fix

Figure 16. Two real recordings exposed a weakness on heavy-weight keying. On a synthetic keying-weight test (weight 0.55), one targeted fine-tune cut the error from 13.4% to 0.1% (DeepCW: 13.3%). An independent real-air test is pending.

Limits: every test set is synthetic, and real on-air CER has not been measured yet. The real-air benchmark and all its measurement data will be published openly. Known weak spots are very tight spacing and phantom characters on long tuning carriers. Input must be in 156–1406 Hz.

6. Coming in early November

NeuroCW app preview

Figure 17. NeuroCW for Windows (ONNX). Preview mockup; the design is still changing.

First on-air test (test build)

Video. NeuroCW test build decoding KiwiSDR web audio (receiver in SSB mode). Watch on YouTube

Before release, I ran a pre-release test build of NeuroCW on real off-air signals. The audio came from a KiwiSDR web receiver and was played on the PC, then fed to NeuroCW through a loopback device. The receiver was set to SSB mode, because the current model was trained mainly on SSB-received audio. Decoding with the receiver in CW mode has not been tested yet.

NeuroCW decoding DL1ZAL at 40 WPM with station lookup

Figure A. A strong station at about 1080 Hz. NeuroCW copies "DE DL1ZAL" at 40 WPM, and the station panel identifies Germany. The last repeat is misread as KL1ZAL.

NeuroCW decoding a 22 WPM ragchew

Figure B. A 22 WPM ragchew at about 757 Hz. Mostly readable ("…WHEN I GOT MY TICKET WAS AGE 15"), with small word and spacing errors.

NeuroCW pileup mode with two simultaneous tracks

Figure C. Pileup mode decodes two signals at once. Track A (506 Hz) reads well. The weaker Track B (1119 Hz) comes out garbled.

NeuroCW decoding a long QSO with accumulating errors

Figure D. A long QSO at about 667 Hz. Phrases like "QRZ.COM PAGE PICS" and "OK ON SPELLING" come through, but errors pile up in longer passages.

Honest notes. This is a test build, not a finished decoder. Early parts of the session decoded well, but later portions sometimes degraded, with garbled word endings and misread repeats. These results are from one informal session and are not a benchmark. Next, I will test with the receiver in CW mode. The public release is planned within one month.

Real-world copy like this is exactly where more training data helps. If you have real CW recordings with 100% verified transcripts, please email kd8cec@gmail.com with the subject "NeuroCW data". 73, Ian Lee, KD8CEC

7. Related work & references

ApproachExamplesWhere NeuroCW sits
Classical DSP decodersfldigi [7], CW Skimmer [8]Baseline idea: no learning, hand-tuned timing
CNN/LSTM + CTC for MorseAG1LE [5], MorseNet [6]Same CTC idea, bigger encoder and data
Neural CW decoder (ONNX)DeepCW [9]Comparison baseline in Table 1
Speech-recognition encodersConformer [2], CTC [1]Backbone and loss used here

Table 2. Prior work. NeuroCW borrows ASR building blocks [1–4] and applies them to CW audio.

  1. A. Graves, S. Fernández, F. Gomez, J. Schmidhuber, "Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks," ICML 2006. PDF
  2. A. Gulati et al., "Conformer: Convolution-augmented Transformer for Speech Recognition," Interspeech 2020. arXiv:2005.08100
  3. J. Su et al., "RoFormer: Enhanced Transformer with Rotary Position Embedding," 2021. arXiv:2104.09864
  4. J. Lee, S. Watanabe, "Intermediate Loss Regularization for CTC-based Speech Recognition," ICASSP 2021. arXiv:2102.03216
  5. M. Niininen (AG1LE), "Training a Computer to Listen and Decode Morse Code," 2019. blog · code
  6. W. Li, K. Wang, L. You, "MorseNet: A Unified Neural Network for Morse Detection and Recognition in Spectrogram," IEEE Access, vol. 8, 2020. DOI
  7. fldigi, W1HKJ. sourceforge.net/projects/fldigi
  8. CW Skimmer, VE3NEA. dxatlas.com/CwSkimmer
  9. DeepCW, e04. github.com/e04/web-deep-cw-decoder · engine
Help close the real-air gap. NeuroCW needs real received CW recordings with 100% verified transcripts. Details are in Part 2. Email kd8cec@gmail.com, subject "NeuroCW data".

73, Ian Lee / KD8CEC

Comments

Popular posts from this blog

UV-K5 CEC HF Firmware v0.5 — Full-Band HF Receive

Historical note: this post documents an early 2024 build and is kept for reference. For current firmware, use C-Board Firmware v0.32 , and see CEC UV-K5 Firmware Source Is Now Open for the source code. ▶ Watch the HF 0.5 fullband walkthrough on YouTube → Subscribe to the KD8CEC YouTube channel for more UV-K5 HF videos. Related: UV-K5 · si4732 · HF full band  Introduction to UV-K5 HF 0.5 (Fullband receive version) This is an introduction to UV-K5 HF full-band reception firmware 0.4HF using SI4732-A10. This version is released separately from the existing UV-K5 CEC firmware version. because space is needed to store a large PATCH file to use SI4732-A10's SSB. This article only describes the features newly added in Version 0.5. Please check the links below for full features. How to modify your hardware http://www.hamskey.com/2024/02/uv-k5s-hf-full-band-reception-lsb-usb.html Version 0.3HF (Most feature descriptions are provided) http://www.hamskey....

C-Board (DSP Board) for UV-K5 — Hardware Overview (Updated June 2024)

  C-BOARD for UV-K5 I created an externally mountable DSP-Board to process digital signals from UV-K5. DSP-Board was named C-Board. C-Board is divided into versions ranging from the simplest version to one that can be equipped with GPS.

Release DVPI Version 1.03 (scirpt update)

 Release DVPI Version 1.03 There have been some changes to the DMR node recently. This version changes only those related to the recently changed DMR node. If you normally use Version 1.0 or Version 0.95, no upgrade is required. DVPi uses the USRP Client protocol.  When you install and use DVSwitch, you must read and comply with the license that appears. The user is responsible for the license for the use of DVPi.