balbal-v2-manas

erayyapagci/balbal-v2-manas

作者
erayyapagci
任务
语音识别
下载量
201
点赞数
16
趋势分
16
许可证
other
收录时间
2026/11/4

license: other license_name: balbal-community-license-1.1 license_link: LICENSE language:

  • tr
  • en pipeline_tag: automatic-speech-recognition tags:
  • speech-recognition
  • turkish
  • english
  • conformer
  • fastconformer
  • ctc
  • kenlm
  • onnx base_model: nvidia/stt_en_fastconformer_ctc_large base_model_relation: finetune model-index:
  • name: balbal-v2-manas results:
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: Mu-Bench (tr-TR phone calls) type: sierra-research/mu-bench config: tr-TR split: test args: language: tr metrics:
      • type: wer value: 8.2 name: Test WER
      • type: sigwer value: 14.89 name: Test sigWER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: FLEURS (Turkish) type: google/fleurs config: tr_tr split: test args: language: tr metrics:
      • type: wer value: 4.06 name: Test WER
      • type: cer value: 1.21 name: Test CER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: LibriSpeech (clean) type: librispeech_asr config: clean split: test args: language: en metrics:
      • type: wer value: 2.97 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: LibriSpeech (other) type: librispeech_asr config: other split: test args: language: en metrics:
      • type: wer value: 6.45 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: AMI (Meetings test) type: edinburghcstr/ami config: ihm split: test args: language: en metrics:
      • type: wer value: 13.31 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: Earnings-22 type: revdotcom/earnings22 split: test args: language: en metrics:
      • type: wer value: 15.61 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: Vox Populi type: facebook/voxpopuli config: en split: test args: language: en metrics:
      • type: wer value: 7.82 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: GigaSpeech type: speechcolab/gigaspeech split: test args: language: en metrics:
      • type: wer value: 12.3 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: SPGI Speech type: kensho/spgispeech config: test split: test args: language: en metrics:
      • type: wer value: 5.73 name: Test WER
    • task: type: automatic-speech-recognition name: Automatic Speech Recognition dataset: name: TED-LIUM 3 type: LIUM/tedlium config: release3 split: test args: language: en metrics:
      • type: wer value: 5.2 name: Test WER

Ak Kula kanatlarını açtığında…

balbal-v2-manas

The large balbal-v2 model: Turkish and English speech recognition that runs on a CPU. FastConformer-CTC with the balbal looped refiner and a product-key acoustic memory, decoded with a 6-gram token KenLM. Trained on about 7,000 hours of audio.

  • Accurate on Turkish phone calls: 8.20% WER / 14.89% sigWER on Mu-Bench Turkish (official harness, GPT-4.1 judge).
  • Read speech: 4.06% WER on FLEURS Turkish test.
  • English too: 8.67% average WER on the English Open ASR Leaderboard test sets.
  • CPU speed: 123× faster than real time on 8 threads.

Smaller and faster sibling: balbal-v2 (45M parameters, 236× real time).

Model page, browser demo and Android app: erayy.com/balbal · Türkçe

Code (Apache 2.0): https://github.com/erayyap/balbal

Model

PartDetails
Acoustic modelFastConformer-CTC, 18 layers, d_model 512, 80 mel, 4x subsampling (40 ms frames)
Looped refiner2-layer Transformer refiner (width 256) on top of the encoder output, 3 passes (each pass takes the previous CTC distribution as input)
Acoustic memoryProduct-key memory: 1000×1000 subkeys, 8 heads, top-32, value dim 192, 3-frame context
VocabularySentencePiece 2,048 pieces + CTC blank
Language model6-gram token KenLM over the SentencePiece pieces
Parameters313.3M, of which 192.0M are the memory table (only a few of its rows are read per frame)

Output is cased, punctuated text with per-word timestamps. Numbers come out as digits through the inverse text normalization in the code (--no-itn keeps the spoken words). Audio longer than 30 s is cut into 30 s chunks.

Results

Turkish

FLEURS tr test (743 clips) and Mu-Bench tr-TR (846 phone-call clips); balbal models with KenLM decoding, the other open models with their default inference. FLEURS is scored with balbal-normalizer (balbal/normalizer in the code repository); Mu-Bench with its official harness and GPT-4.1 judge. sigWER is the share of utterances with at least one meaning-changing error. CPU speed: seconds of audio per second of processing, same 100 clips, batch 1, 8 threads of an AMD Ryzen AI Max+ 395.

ModelParametersMu-Bench WERMu-Bench sigWERFLEURS WER / CERCPU speed
balbal-v2-manas313M8.2014.894.06 / 1.21123×
balbal-v245M9.4618.445.22 / 1.52236×
Mihu AI STT-v266M10.9121.165.26 / 1.6216×
balbal-v145M11.9325.186.54 / 1.8596×
Qwen3-ASR 1.7B1.7B14.7630.616.52 / 1.710.8×
Duyu-small49M15.7035.226.62 / 1.8830×
Whisper large-v31.55B16.6728.373.71 / 1.080.9×
UfakZeka Kulak32M17.8738.186.72 / 1.98152×
Seda v0.266M17.9234.526.20 / 1.9619×
omniASR LLM 7B7B21.1044.685.31 / 1.50<1×
Whisper large-v3-turbo809M24.6547.044.07 / 1.181.6×
omniASR CTC 7B7B27.6649.887.71 / 1.912.4×

English

The 8 English Open ASR Leaderboard test sets (168 hours), scored with the leaderboard's English normalizer, KenLM decoding. WER %.

ModelLibriSpeech cleanLibriSpeech otherAMIEarnings-22VoxPopuliGigaSpeechSPGISpeechTED-LIUMAverage
balbal-v2-manas2.976.4513.3115.617.8212.305.735.208.67
balbal-v210.3219.3531.5230.8618.1823.4316.1714.9620.60

Files

model.json                       {"model": "balbal-v2-manas"}
model.pt                         PyTorch weights (1.2 GB)
tokenizer/                       SentencePiece model, vocab
lm/model.binary                  6-gram token KenLM, no KIRAAT text (692 MB)
lm/tokenizer.model               same SentencePiece model
onnx/model.onnx (+ .data)        fast CPU graph: balbal custom operators, int8 matrix weights (353 MB)
onnx/model-plain.onnx (+ .data)  same model, standard onnxruntime operators only (898 MB)

This folder is the MODEL_DIR the code expects. Both ONNX graphs match PyTorch within 0.11 WER points on our Turkish dev set.

The KenLM in lm/ is built without KIRAAT text. Removing it does not cost accuracy; on our Turkish dev set (721 clips), WER / CER %:

KenLMbalbal-v2-manasbalbal-v2
with KIRAAT text7.16 / 2.798.85 / 3.38
without KIRAAT text (released)7.13 / 2.798.74 / 3.33

Usage

Linux x86-64, Python 3.11 or 3.12:

pip install balbal
balbal run --model manas speech.wav          # downloads this model on the first run
balbal run --model manas --json speech.wav   # text + per-word timestamps
import balbal
model = balbal.load("balbal-v2-manas")
print(model.transcribe("speech.wav")["text"])

The balbal library ships the fast graph's custom operators and the native beam decoder prebuilt. From source (Linux x86-64, Python 3.12):

git clone https://github.com/erayyap/balbal && cd balbal
pip install -r requirements/cpu.txt
python inference/build_native.py           # KenLM beam decoder
inference/kernels/build.sh                 # custom operators of the fast graph
huggingface-cli download erayyapagci/balbal-v2-manas --local-dir balbal-v2-manas
python inference/transcribe.py --model-dir balbal-v2-manas speech.wav

--runtime onnx runs the plain graph (standard onnxruntime only), --runtime torch runs PyTorch, --hotwords "Eray,Hasan" biases the decoder toward given words. Streaming (WebSocket server, browser microphone demo) is in inference/streaming/. See the code repository for the Python API and training.

Memory-efficient variant (mem-efficient/)

This variant removes 75% of the product-key memory slots (the least-used ones first), so the memory table shrinks from 1,000,000 to 250,000 rows. Everything else is unchanged. It is meant to be used only with the KenLM decoder; if you decode greedily, use the full model.

FullMemory-efficient
Memory slots1,000,000250,000
Fast graph download369 MB217 MB
Standard-operator graph download941 MB354 MB
DEV (721 clips), KenLM WER / CER7.17 / 2.837.30 / 2.91
DEV, greedy WER / CER9.47 / 3.3010.46 / 3.55
FLEURS tr test (743 clips), KenLM WER / CER4.08 / 1.214.07 / 1.21
FLEURS tr test, greedy WER / CER5.86 / 1.647.16 / 1.99
Fast runtime, peak RSS1.28 GB1.15 GB
Standard-operator runtime, peak RSS2.26 GB1.61 GB

With the fast graph it runs about 20% slower than the full model (the masked memory read scans more candidates); the standard-operator graph is about 4.5× slower than the full one, so prefer the fast graph.

The files are in mem-efficient/onnx/: model.onnx (fast graph, int8 memory rows) and model-plain.onnx (standard operators only, fp32 memory rows). The language model is the one in the repository's lm/ folder.

Loading

The balbal 0.1.1 package does not download this variant by itself. Download the folder, put the repository's lm/ folder next to its onnx/ folder, and pass the directory:

import balbal
m = balbal.load("balbal-v2-manas", runtime="onnx", model_dir="path/to/mem-efficient")
print(m.transcribe("audio.wav")["text"])

The fast graph uses one extra operator (PkmReadQ8M) that the operator library inside the package does not contain. mem-efficient/ops/ has a library that does, built for x86-64 v2, v3 and v4 (AVX-512), with its source. Point BALBAL_OPS_LIB at the one that matches your CPU, then load with runtime="fast":

export BALBAL_OPS_LIB=path/to/mem-efficient/ops/libbalbal_ops_mem25_v4.so

Limitations

  • Short clips: very short clips (a word or two) carry little context: errors are more frequent, and Turkish and English words can get mixed up.
  • Long recordings: offline transcription cuts long audio into 30-second chunks; there is no speaker diarization.

License

The weights, tokenizer and language model in this repository are released under the balbal Community License 1.1 (see LICENSE):

  • Free for research and any non-commercial use, including fine-tuning and sharing adapted versions.
  • Free for small businesses' commercial use: under US$1M revenue in the last 12 months, fewer than 25 people and under US$250k raised from outside investors. This includes running your own business (for example on your own customer calls) and building and selling speech products on balbal-v2-manas, such as a transcription app, a speech recognition API or a voice assistant, as long as the product shows "Powered by balbal" (linked to github.com/erayyap/balbal) on its website or app and in its API docs.
  • Larger companies: commercial use above these limits needs a separate license.

The code in github.com/erayyap/balbal is licensed separately under Apache 2.0.

The encoder was initialized from NVIDIA's stt_en_fastconformer_ctc_large (CC BY 4.0).

Acknowledgements

Citation

@misc{yapagci2026balbalv2,
  author       = {Eray Yapa{\u{g}}c{\i}},
  title        = {balbal-v2: Turkish Speech Recognition on a CPU},
  year         = {2026},
  month        = oct,
  howpublished = {\url{https://erayy.com/balbal}},
  note         = {Code: \url{https://github.com/erayyap/balbal}}
}

Türkçe özet

balbal-v2-manas, CPU'da çalışan büyük balbal-v2 modeli: Türkçe ve İngilizce konuşma tanıma. FastConformer-CTC, 3 geçişli döngülü düzeltici ve ürün-anahtar akustik bellek; 6-gram token KenLM ile çözülür. Yaklaşık 7.000 saat ses üzerinde eğitildi, 313M parametre.

Kurulum: pip install balbal, sonra balbal run --model manas ses.wav (model ilk çalıştırmada iner).

  • Mu-Bench Türkçe (resmi puanlama, GPT-4.1 hakem): %8,20 WER / %14,89 sigWER (balbal-v2 %9,46 / %18,44, balbal-v1 %11,93 / %25,18).
  • FLEURS Türkçe test: %4,06 WER (balbal-v2 %5,22, balbal-v1 %6,54).
  • İngilizce Open ASR test setleri (8 set): ortalama %8,67 WER.
  • 8 CPU thread'inde gerçek zamanın 123 katı hız.

lm/ içindeki KenLM, KIRAAT metni olmadan kuruldu; bu doğruluğa mal olmadı (DEV WER 7,16 → 7,13).

Çok kısa kliplerde (bir iki kelime) bağlam az: hatalar daha sık, Türkçe ve İngilizce kelimeler karışabiliyor.

Ağırlıklar balbal Community License 1.1 ile lisanslıdır (LICENSE): araştırma ve ticari olmayan her kullanım serbest; küçük işletmeler (son 12 ayda 1 milyon dolardan az gelir, 25 kişiden az çalışan, dış yatırımcıdan 250 bin dolardan az yatırım) modeli ticari olarak da ücretsiz kullanabilir. Buna kendi işlerinde kullanmak da, model üzerine konuşma tanıma, transkripsiyon ya da sesli asistan ürünü, API'si veya platformu kurup satmak da dahildir; bu ürünler sitelerinde ya da uygulamalarında ve API dokümanlarında görünür bir "Powered by balbal" ibaresi göstermelidir. Bu sınırların üzerindeki şirketlerin ticari kullanımı ayrı lisans gerektirir. Kod ayrı olarak Apache 2.0 lisanslıdır: github.com/erayyap/balbal.

内容来源:Hugging Face 模型卡

在 Hugging Face 查看