← All models

automatic-speech-recognition Β· audio Β· WASM (WebGPU when available) Β· ~1.2 GB

wav2vec2-XLSR-53 β€” Korean speech, one Hangul syllable per frame

The French, Spanish and Russian demos are all the same cross-lingual cousin β€” XLSR-53, pre-trained on 53 languages (56,000 hours of multilingual audio) β€” fine-tuned per language. This one is fine-tuned on Korean, and it does something the Latin-script versions can't: its CTC head is not an alphabet of letters. It emits whole Hangul syllable blocks β€” κ°€, 각, κ°„ … 힘 β€” from a 1205-symbol vocabulary. Every ~20 ms frame is labelled with one complete syllable, and the transcript is just those frames collapsed. Pick a clip and watch the syllables assemble into Korean.

At a glance

ModelFinDIT-Studio/wav2vec2-large-xlsr-53-korean-onnx (base: jonatasgrosman/wav2vec2-large-xlsr-53-korean)
Task / pipelineautomatic-speech-recognition β€” loaded as AutoModelForCTC so we can see the frames
ArchitectureXLSR-53: wav2vec2-large cross-lingual encoder (24 transformer layers, ~315M params) pre-trained on 53 languages, fine-tuned for Korean. CTC head over a 1205-symbol Hangul-syllable vocab (blank + "|" boundary + 1202 syllable blocks + [UNK]). No decoder.
LanguageKorean (ko) β€” a syllable-level recogniser over Hangul; other languages produce Korean-phonetic gibberish
Quantizationfp32 (full precision) ONNX β€” a single model.onnx at the repo root (no q8/q4 export exists for this model, so we load fp32 with subfolder:"")
Config & tokenizerthe repo ships a tokenizer.json but no config.json and no preprocessor_config.json. So we borrow the wav2vec2-large XLSR-53 architecture config from a reachable sibling (the Korean base repo is access-gated), override vocab_size→1205, do the feature extraction ourselves, and CTC-decode from the model's own 1205-symbol vocab. No sibling weights are used — all weights are the Korean model.onnx.
BackendWebAssembly (WebGPU when a real adapter is present), honest fallback
Download~1.2 GB (single fp32 encoder), cached after first load β€” a big one-time transfer
LicenseApache-2.0 (base model) β€” the ONNX-export repo declares no license of its own
Web APIsWebAssembly / WebGPU, Web Workers, Web Audio (decode + resample), MediaRecorder (mic)

Run it

Choose Korean audio β€” record from your mic, upload a file, or pick a bundled CC0 sample. The page decodes it to 16 kHz mono, draws the waveform, and runs the CTC model in a Web Worker. XLSR-53 does best on clear Korean speech. Heads up: this model has no quantized export, so the first load is a ~1.2 GB fp32 download.

or a sample:

Transcript (Korean)

Transcribe a clip to see the Korean text here.

This checkpoint is a compact, cross-lingual recogniser rather than a large Korean-only model, so expect the odd near-homophone slip (e.g. μž¬β†”μ œ) β€” that is honest real ASR output, produced entirely on your device.

See inside β€” the CTC collapse over Hangul syllables

Below is the model's raw per-frame argmax: one cell per ~20 ms frame, showing the single syllable it thinks is most likely there. Most frames are blank (Β·) β€” the model saying "nothing new here". Where a sound lands you get a run of the same syllable. The transcript is produced by two mechanical rules, no decoder involved: (1) merge consecutive duplicates, (2) drop the blanks. A run like Β·Β· κ°€ κ°€ Β·Β· 수 수 Β·Β· collapses to κ°€μˆ˜.

emitted syllable ␣ word boundary · blank frame
Transcribe a clip to see its per-frame argmax and the collapse.

Why it matters

Most of the world's ~7,000 languages have little labelled speech data. Cross-lingual self-supervised pre-training is how the field reaches them: XLSR-53 learns speech structure from 53 languages at once, so fine-tuning to a new language needs far fewer transcripts. That is what puts a usable Korean recogniser inside a browser tab β€” private, offline once cached, no server, no key. And because it's CTC (frames, not generated tokens) it can't hallucinate an unspoken sentence, and every syllable is pinned to a moment in time.

Use cases

Basics

One Korean clip in, Korean text out β€” and the per-frame syllable strip that produced it.

Practical

Forced alignment: real per-syllable Korean timings, straight from the CTC frames.

Wild

Feed it English and watch cross-lingual transfer break down into Korean phonetics.

Multi-model

Transcribe Korean with XLSR β†’ OPUS-MT translates it to English, all on-device.

How the API works

Normally the one-liner is the ASR pipeline β€” but this repo ships no config.json and keeps its ONNX at the repo root, so we load the model directly (borrowing an XLSR-53 sibling's architecture config) and do the CTC collapse ourselves (which is exactly what the pipeline does internally):

import { AutoConfig, AutoModelForCTC } from "@huggingface/transformers";

const model_id = "FinDIT-Studio/wav2vec2-large-xlsr-53-korean-onnx";
// Repo has no config.json β†’ borrow a reachable XLSR-53 sibling's config (architecture only, no weights)
const config = await AutoConfig.from_pretrained("jonatasgrosman/wav2vec2-large-xlsr-53-spanish");
config.vocab_size = 1205;         // …then match the Korean CTC head (1205 Hangul syllables)
config.pad_token_id = 1204;       // [PAD] is the CTC blank

const model = await AutoModelForCTC.from_pretrained(model_id, {
  device: "wasm", dtype: "fp32",  // the only export is a single fp32 model.onnx…
  subfolder: "", config,          // …at the repo ROOT, not the usual onnx/ subfolder
});

// audio = 16 kHz mono Float32Array, normalised to zero-mean/unit-variance
const { logits } = await model({ input_values }); // shape [1, frames, 1205]

// greedy CTC decode: argmax per frame, merge duplicates, drop the blank (id 1204)
const ids  = argmaxPerFrame(logits);   // e.g. [1204,1204,26,26,1204,1140,...]
const text = collapse(ids);            // "κ°€μˆ˜β€¦" in Hangul β€” no decoder involved

Inference runs in a Web Worker so the UI never janks. The worker returns the raw per-frame argmax (whole syllables) and real per-word timings (from the frame each syllable was emitted at) β€” nothing is faked or pre-computed.

References