Audio DSP & Signal Analysis

Morse Code Audio Decoder

Translate continuous wave (CW) audio and sound files into readable text directly in your browser using frequency Goertzel DSP, FFT spectrogram analysis, and adaptive envelope detection.

Morse Code Audio Translator & CW Decoder

Real-time Goertzel FFT carrier tracking, hysteresis thresholding, and automated PARIS timing

Drag & drop your Morse code audio file here, or browse files

Supports WAV (PCM 44.1/48kHz), MP3, OGG, M4A, FLAC, and AAC recordings

Real-Time CW Audio Spectrogram
Center: 700 Hz
Ready. Upload an audio file, enable microphone, or click a sample preset below.

Decoded Signal & Translation

Detected Morse Stream (Dots & Dashes)
Waiting for Morse code audio signal... Upload a file or click "Start Live Microphone".
Decoded Plain Text (ITU-R M.1677-1)
—

How Digital CW Audio Decoding Works

From continuous analog pressure waves to discrete alphanumeric characters: the five-stage digital signal processing pipeline.

1Digitization & Audio Buffering

Incoming sound from your microphone or audio file is sampled by the browser’s Web Audio API at 44,100 Hz or 48,000 Hz. The continuous waveform is sliced into small windowed frames (typically 512 or 1024 samples) with 50% overlap to balance frequency resolution with time precision.

2Tone Isolation (FFT / Goertzel Filter)

Continuous wave (CW) transmissions consist of an on-off keyed unmodulated carrier, heard as a single audio tone (typically 600 Hz – 800 Hz). The DSP engine applies Fast Fourier Transform (FFT) or a Goertzel single-frequency filter to calculate energy specifically at the carrier pitch while ignoring broad-spectrum noise.

3Hysteresis & Envelope Thresholding

Raw audio contains ambient static that causes energy levels to bounce rapidly. To prevent signal chatter, the decoder uses a dual-threshold Schmitt trigger: the tone must exceed an upper threshold to register as ON, and drop below a lower threshold to register as OFF.

4Pulse & Gap Clustering

The software measures the duration of each active pulse in milliseconds. An adaptive clustering algorithm compares pulse durations: short pulses (~1 unit) are labeled as dits (·), and long pulses (~3 units) are labeled as dahs (−). Silences are classified as intra-character (1 unit), inter-character (3 units), or inter-word (7 units).

Best Practices for Clean Audio Decoding

Follow these acoustic and radio configuration guidelines to avoid dropped letters and misclassified signals.

1. Prefer Direct Line-In or Virtual Audio Cable over Ambient Microphone

Acoustic speaker-to-microphone coupling introduces room echo, bass resonances, and ambient noise (fan hum, typing). For maximum accuracy, connect a 3.5mm audio patch cable from your transceiver or phone into your computer’s line input, or use a Virtual Audio Cable (VAC) driver when monitoring WebSDRs or SDR software.

2. Narrow Your Receiver’s IF / DSP Filter Bandwidth

On HF ham radio bands, adjacent stations and atmospheric static will degrade decoding if your receiver is set to wide SSB filters (2.4 kHz). Engage your radio’s narrow CW filter (set to 250 Hz or 500 Hz) and center it directly on the desired station’s pitch.

3. Match Input Volume and Avoid Clipping Distortion

Excessive input volume causes digital harmonic clipping (flat-topped sine waves), which scatters energy across harmonic frequencies and disrupts the tone detector. Keep the input volume at roughly 50% to 70% where the waveform is clear and unclipped.

4. Account for "Fists" vs. Electronic Keyers

Automated decoders work with near 100% accuracy on transmissions sent with electronic keyers or computer keyboards (such as contest macros). Hand-keyed Morse code sent with a manual straight key or mechanical bug often features slight variations in dit/dah ratios (“fist swing”), which can occasionally require manual interpretation.

Digital Signal Processing Mathematics

The Mathematics of Automated Morse Audio Decoding

Converting an analog audio waveform into discrete textual characters requires multi-stage digital signal processing. Here is how our client-side engine mathematically isolates tones, rejects noise, and resolves element boundaries.

1. Goertzel Filter vs. Full FFT

While a standard Fast Fourier Transform (FFT) computes spectral magnitude across hundreds of frequency bins at an O(N log N) computational cost, radiotelegraph CW signals are concentrated entirely at a single known carrier pitch (e.g., 700 Hz).

The Goertzel algorithm implements a specialized second-order Infinite Impulse Response (IIR) filter that computes the discrete Fourier coefficient for one exact frequency bin in O(N) time. By evaluating the recurrence relation:

s[n] = x[n] + 2×cos(ω0)×s[n-1] − s[n-2]
Power = s[N-1]² + s[N-2]² − 2×cos(ω0)×s[N-1]×s[N-2]

This enables zero-latency real-time tone detection at 48,000 samples per second inside the browser without causing UI frame drops.

2. Dual-Threshold Schmitt Trigger (Hysteresis)

A naive energy detector uses a single static threshold: if audio volume exceeds 50%, the tone is marked ON; otherwise OFF. However, real-world signals suffer from ambient room noise and atmospheric flutter. When the audio level hovers right at the threshold, a single-threshold detector chatters wildly, producing dozens of fake 5 ms “micro-dits.”

To eliminate chatter, our engine employs a Schmitt trigger with dual hysteresis thresholds:

  • • High Threshold (65%): The signal must decisively rise above 65% of the dynamic rolling peak to trigger an “ON” state.
  • • Low Threshold (35%): Once activated, the tone remains marked ON until the energy level drops all the way below 35%.

This 30% hysteresis band completely suppresses audio ripple and contact chatter.

3. Dynamic Clustering & Automatic Speed (WPM) Estimation

Once raw ON and OFF pulse durations are recorded in milliseconds, the decoder must classify pulses into dits (1 unit) and dahs (3 units). Human telegraphers do not key at a perfectly constant speed; their tempo naturally drifts by ±10% over the course of a transmission.

Our algorithm maintains a rolling statistical histogram of the last 20 received pulses. A k-means clustering model automatically separates the pulse distribution into two centroids: the Dit Centroid (T) and the Dah Centroid (3T). The decision boundary between a dot and a dash is dynamically placed at Boundary = (Dit + Dah) / 2. This allows the decoder to automatically track an operator who speeds up from 14 WPM to 20 WPM without dropping a single letter.

How to Route Live Shortwave Radiotelegraphy into the Decoder

You do not need an expensive amateur radio station to decode live on-the-air Morse code.

Method 1: WebSDR Receivers

Open a public WebSDR station (such as the University of Twente receiver) in another browser tab. Tune to popular CW calling frequencies:7.030 MHz (40m band) or 14.060 MHz (20m band). Set mode to CW, open your system audio loopback, and route audio directly into our decoder.

Method 2: Virtual Audio Cable

Install free software like VB-Audio Virtual Cable (Windows) or BlackHole (macOS). Set your SDR software output (SDR#, HDSDR, GQRX) to the Virtual Cable, and select “Virtual Cable” as your microphone input on this page for pristine, zero-noise digital audio decoding.

Method 3: Direct 3.5mm Patch Cable

Run a shielded 3.5mm stereo cable from your ham radio transceiver's headphone jack or recording output into your PC line-in port. Insert an inexpensive 1:1 audio ground loop isolator transformer to eliminate 60 Hz AC mains hum from the power supply.

The Human Ear vs. Machine Decoders in Radiotelegraphy

In optimal, noise-free laboratory conditions, computer decoders transcribe Morse code at speeds upwards of 60 WPM with mathematical precision. However, on real-world high-frequency (HF) shortwave radio bands, trained human CW operators consistently outperform software.

QSB (Signal Fading)

As ionospheric layers shift, signal strength dips below the software’s fixed threshold. The human brain interpolates missing dits from sentence context.

QRN (Static Cracks)

Atmospheric thunderstorm static produces sharp impulse spikes that register as false dits on decoders, but are instantly discarded by human psychoacoustics.

QRM (Interference)

When two stations transmit within 50 Hz of each other, software decoders blend the tones. Experienced operators isolate the target tone using mental audio pitch discrimination.

Frequently Asked Questions

An audio decoder processes incoming sound buffers using digital signal processing (DSP). It isolates the carrier frequency (typically between 500 Hz and 900 Hz) using Fast Fourier Transform (FFT) or a Goertzel filter, calculates the root-mean-square (RMS) energy level across consecutive time frames, and applies hysteresis thresholding to detect when a tone is ON or OFF. It then classifies pulse lengths into dits and dahs, measures silence gaps to identify character boundaries, and translates the sequences into text per ITU-R M.1677-1 standards.

Need to convert text to Morse audio instead?Use our real-time text-to-Morse translator with customizable WPM and tone pitch controls.
Morse Code Audio Decoder — Mic & File to Text