← All models

automatic-speech-recognition Β· audio Β· WASM (WebGPU when available) Β· ~240 MB

wav2vec2-XLSR-53 β€” Russian speech, one Cyrillic character per frame

The English wav2vec2 demo speaks one language. This is its cross-lingual cousin: XLSR-53 was pre-trained on 53 languages (56,000 hours of multilingual audio) and then fine-tuned on Russian. That shared multilingual foundation is what makes a solid Russian recogniser trainable from a modest amount of labelled speech β€” the model already learned what human speech sounds like before it ever saw a Russian transcript. Same CTC mechanics as the English model, but the output alphabet is Cyrillic. Pick a clip and watch the frames collapse into Russian.

At a glance

Modelonnx-community/wav2vec2-large-xlsr-53-russian-ONNX (base: jonatasgrosman/wav2vec2-large-xlsr-53-russian)
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 Russian. CTC head over a 39-symbol Cyrillic vocab (blank + "|" boundary + hyphen + 33 letters incl. Ρ‘). No decoder.
LanguageRussian (ru) β€” this is a language-specialised recogniser; other languages produce Cyrillic gibberish
Quantizationq4 (4-bit) ONNX β€” onnx/model_q4.onnx (the q8/int8 exports of this model are degenerate; q4 is the honest runnable one)
BackendWebAssembly (WebGPU when a real adapter is present), honest fallback
Download~240 MB (single encoder model), cached after first load
LicenseApache-2.0
Web APIsWebAssembly / WebGPU, Web Workers, Web Audio (decode + resample), MediaRecorder (mic)

Run it

Choose Russian audio β€” record from your mic, upload a file, or pick the bundled 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 Russian speech.

or a sample:
Russian β€” Spoken Wikipedia (11s)

Transcript (Cyrillic)

Transcribe a clip to see the Russian text here.

See inside β€” the CTC collapse over Cyrillic

Below is the model's raw per-frame argmax: one cell per ~20 ms frame, showing the single Cyrillic character 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 letter. 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 character ␣ 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 Russian 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 character is pinned to a moment in time.

Use cases

Basics

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

Practical

Forced alignment: real per-word Russian timings, straight from the CTC frames.

Wild

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

Multi-model

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

How the API works

The one-liner is the ASR pipeline β€” but to see the frames we load the model directly and do the CTC collapse ourselves (which is exactly what the pipeline does internally):

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

const model_id = "onnx-community/wav2vec2-large-xlsr-53-russian-ONNX";
const processor = await AutoProcessor.from_pretrained(model_id);
const model = await AutoModelForCTC.from_pretrained(model_id, {
  device: "wasm", dtype: "q4",   // q4 is the runnable export; q8/int8 are degenerate here
});

// audio = 16 kHz mono Float32Array
const inputs = await processor(audio);
const { logits } = await model(inputs); // shape [1, frames, 39]  ← 39 Cyrillic symbols

// greedy CTC decode: argmax per frame, merge duplicates, drop the blank (id 0)
const ids  = argmaxPerFrame(logits);    // e.g. [0,0,22,22,0,23,15,...]
const text = collapse(ids);             // "при…" in Cyrillic β€” no decoder involved

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

References