← All models

audio-to-audio Β· speech enhancement Β· WASM Β· ~0.5 MB

GTCRN β€” strip the noise out of speech

A different audio task from the ASR, TTS, and classifier demos: speech enhancement. GTCRN (Grouped Temporal Convolutional Recurrent Network) is a tiny real-time denoiser β€” ~48k parameters, a 0.5 MB ONNX β€” that takes the noisy speech spectrum frame by frame and predicts the clean spectrum, which we invert back to audio. Add noise to a clean clip (so the gain is measurable) or bring your own noisy recording, and hear it cleaned up β€” entirely on your device.

At a glance

Modelbitsydarel/gtcrn-onnx β€” gtcrn_simple.onnx (streaming)
Taskaudio-to-audio β€” speech enhancement / denoising
ArchitectureGTCRN: grouped temporal-conv recurrent net on the complex STFT (~48k params)
Pipeline512-pt STFT (hop 256, sqrt-Hann) β†’ streaming GTCRN per frame (recurrent caches) β†’ iSTFT (overlap-add)
I/O16 kHz mono in β†’ 16 kHz mono out; input mix [1, 257, 1, 2] + 3 caches β†’ enh [1, 257, 1, 2] + caches
Quantizationfp32
Runtimeonnxruntime-web (raw ONNX Runtime Web) β€” no transformers.js speech-enhancement class exists
BackendWebAssembly (runs anywhere; no WebGPU needed) β€” faster than real time on CPU
Download~0.5 MB, cached after first load
LicenseApache-2.0 (GTCRN, Xiaobin-Rong)
Web APIsWebAssembly, Web Workers, Web Audio (decode/resample), Canvas β€” all Baseline widely available

Run it

Pick a clean clip, add noise at a chosen level (so we can measure the gain), then Enhance. Or upload your own noisy recording.

The bundled JFK speech clip is an inaugural excerpt (20 January 1961), spoken by John F. Kennedy β€” public domain, U.S. government work Β· JFK audio source and attribution record.

3 dB
…or drop a noisy recording here (wav/mp3/webm), or click to choose

See inside β€” noise floor & energy

Denoising shows up as a lower noise floor (the RMS of the quietest frames β€” the gaps between words, which should be near-silent) while the speech energy is preserved. This is the real measurement on the current clip.

Enhance a clip to see the measurements.

Why it matters

A 0.5 MB denoiser that runs faster than real time on a CPU makes clean audio a local, private, offline primitive β€” no upload, no service, no GPU.

Use cases

Basics

Add noise to a clean clip, enhance it, and hear + measure the before/after gain.

Practical

A voice-note cleaner: record or upload your own noisy audio and download the enhanced WAV.

Wild

Noise stress test: sweep the input SNR and watch how much GTCRN recovers at each level.

Multi-model

Denoise β†’ Whisper: transcribe noisy vs enhanced audio and compare the two transcripts.

How the API works

There's no transformers.js speech-enhancement class, so we run the ONNX graph directly and do the STFT/iSTFT ourselves:

import * as ort from "onnxruntime-web";
const gtcrn = await ort.InferenceSession.create(bytes);         // ~0.5 MB

// per STFT frame (512-pt, hop 256, sqrt-Hann), carrying the recurrent caches:
let conv = zeros, tra = zeros, inter = zeros;
for (const frame of stftFrames(noisy16k)) {          // frame = [1,257,1,2] real/imag
  const o = await gtcrn.run({ mix: frame, conv_cache: conv, tra_cache: tra, inter_cache: inter });
  conv = o.conv_cache_out; tra = o.tra_cache_out; inter = o.inter_cache_out;
  pushEnhancedFrame(o.enh);                            // [1,257,1,2] β†’ iSTFT overlap-add
}

This page runs exactly that in a Web Worker (STFT + streaming GTCRN + iSTFT all off the main thread), and transfers the enhanced PCM back for playback + download.

References