speech-uk/w2v-bert-v5-fixed
speech recognition for Russian, Ukrainian, and English
2 min readupdated
This model is designed for automatic speech recognition across three languages, outputting text with proper capitalization, punctuation, and numbers. It is an improved version of the w2v-bert architecture, trained on 807 hours of data from YouTube videos filtered using tinyasr (a small auxiliary speech recognition model). Compared to the previous version (v4), the model features five times more training data and language models for result correction via beam search. It is well-suited for developers and researchers who need accurate audio transcription in Russian, Ukrainian, or English.
Key features
- Recognition accuracy: overall error dropped to 7.46% on the FLEURS dev dataset when using a language model, compared to 10.03% for v4.
- Trained on 807 hours: used nearly 538,000 audio clips from the YODAS v3.1 database.
- Three language support: Ukrainian, Russian, and English.
- SentencePiece tokenizer: preserves punctuation, letter casing, and numbers just like in subtitles.
What you can do
- Automatically transcribe podcasts, interviews, or video recordings in Russian, Ukrainian, and English.
- Integrate the model into audio processing pipelines to generate high-quality subtitles.
- Use built-in KenLM language models for text post-processing and error reduction in recognition.
Example
import numpy as np, soundfile as sf, torch, sentencepiece as spm
from asr_features import extract_w2v_bert
from huggingface_hub import snapshot_download
from transformers import AutoModelForCTC
path = snapshot_download("speech-uk/w2v-bert-v5-fixed")
model = AutoModelForCTC.from_pretrained(path).eval()
sp = spm.SentencePieceProcessor(model_file=f"{path}/tokenizer.model")
wav, sr = sf.read("audio.wav", dtype="float32", always_2d=True)
wav = wav.mean(1); wav -= wav.mean(); wav /= max(np.abs(wav).max(), 1e-8)
x = torch.from_numpy(np.asarray(extract_w2v_bert(wav, 16000), np.float32))[None]
with torch.inference_mode():
logits = model(x).logits[0]
ids = logits.argmax(-1).tolist()
ids = [t for k, t in enumerate(ids) if t not in (0, 1) and (k == 0 or t != ids[k - 1])]
print(sp.decode_ids(ids))Read more
Details• Metrics: WER on FLEURS dev (with Wikipedia language model) is 6.22 for uk, 5.72 for ru, and 9.72 for en.
• Hardware: training was performed on a single RTX 3090 GPU in bf16 format.
• Requirements: Linux x86-64, glibc 2.34+, Python 3.10+, 16 kHz mono audio.
• Limitations: transcripts were generated automatically based on subtitles and tinyasr, so rare labeling errors may persist; surzhyk is not supported yet.










Comments