Morse Code Audio Decoder
Upload or listen to an audio file and let the decoder translate the dits and dahs into plain text.
Audio decoding module is currently being calibrated.
Check back soon for the WebAudio-powered automatic decoder.
Play Audio with Standard TranslatorHow Does Audio Decoding Work?
Decoding Morse code audio algorithmically involves several layers of digital signal processing (DSP):
- Filtering: The system isolates the tone (usually around 600Hz - 800Hz) from background static.
- Envelope Detection: Identifying when the signal is "on" and when it is "off" by calculating the signal's energy.
- Timing Analysis: Analyzing the duration of the "on" periods to classify them as dots or dashes, and the "off" periods as intrasymbol gaps, letter gaps, or word gaps.
- Text Mapping: Matching the sequences of dots and dashes back into letters and numbers using the standard ITU mapping tree.
The Goertzel Algorithm for Tone Detection
Standard Fast Fourier Transforms (FFT) can be computationally expensive when we only care about a narrow band of frequencies. Digital audio decoders often employ the Goertzel algorithm, a highly efficient DSP technique that detects specific, predefined target frequencies. By tuning the Goertzel filter to the exact pitch of the Morse code signal (commonly centered between 600 Hz and 800 Hz), the decoder can efficiently process incoming WebAudio samples in real time, ignoring irrelevant low-frequency noise (like wind) and high-frequency static.
Adaptive Peak Thresholding
Tones rarely remain at a constant amplitude, especially in shortwave radio (HF) bands where signals suffer from atmospheric fading (QSB). A static amplitude threshold would cause the decoder to miss quieter dots or misinterpret static peaks as dashes. To overcome this, advanced decoders utilize adaptive thresholding. The system continuously tracks the moving average of signal peaks and noise floors, dynamically adjusting the decibel threshold. This ensures robust envelope detection even when the source audio signal fluctuates significantly in volume.
Handling Speed and Timing Variations
When Morse code is sent by a human operator using a straight key, the length of individual dits and dahs will vary naturally. This characteristic is called the operator's "fist." A rigid decoder would fail to translate such hand-sent code. Robust decoders implement adaptive timing trackers, constantly calculating the average duration of the last few dots (WPM speed estimation). By basing the classification boundaries (dot vs. dash, letter space vs. word space) on a floating relative multiplier rather than a fixed millisecond value, the algorithm adapts dynamically to the sender's shifting speed.