Audio file decoder
- The recording is mixed to mono and its loudness is measured every 4 ms.
- A threshold between the background level and the tone level separates “on” from “off”. The sensitivity slider moves that threshold.
- Very short blips (under 8 ms) are treated as noise and merged.
- Tone lengths are grouped into short and long to estimate the dot length; the speed estimate follows from it.
- Each tone becomes a dot or dash and each silence an element, letter or word gap. Lengths close to a decision boundary are flagged as uncertain.
Tested on: synthetic single-tone recordings at 12–30 WPM, Farnsworth spacing, all-dash messages and added white noise. Not yet tested on: real radio audio, phone recordings, fading signals, hand-keyed timing, several signals at once or speech over Morse — expect errors there and always review the result.