Downloads · 30 days
49
27% of all-time downloads
AigizK/GigaAM-Bashkir-CV25-ONNX
GigaAM-Bashkir-CV25-ONNX is a automatic speech recognition model from AigizK. Use it when you need speech turned into text. The card lists the license as mit.
ONNX Runtime export of AigizK/GigaAM-Bashkir-CV25, a character-level CTC ASR model for Bashkir (Башҡорт теле). The source model was fine-tuned from GigaAM Multilingual multilingualssl on Mozilla Common Voice 25 Bashkir.
Downloads · 30 days
49
27% of all-time downloads
All-time downloads
184
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.1 GB · 100%
From the Hugging Face model README
ONNX Runtime export of AigizK/GigaAM-Bashkir-CV25,
a character-level CTC ASR model for Bashkir (Башҡорт теле). The source model
was fine-tuned from GigaAM Multilingual multilingual_ssl on Mozilla Common
Voice 25 Bashkir.
Raw WER is computed after lowercasing and punctuation removal on the complete
Common Voice 25 splits, using onnx-asr with batch size 32.
| Runtime | Validation WER | Test WER |
|---|---|---|
| PyTorch checkpoint | 7.20% | 7.73% |
| ONNX FP32 | 7.26% | 7.74% |
| ONNX dynamic INT8 | 7.37% | 7.80% |
Validation contains 14,525 clips (19.467 hours); test contains 14,572 clips
(19.885 hours). See evaluation_results.json for exact error counts, hashes,
providers, and runtime measurements.
CPU:
pip install "onnx-asr[cpu,hub]>=0.12,<0.13"
NVIDIA CUDA for FP32:
pip install "onnx-asr[hub]>=0.12,<0.13" onnxruntime-gpu
import onnx_asr
model = onnx_asr.load_model("AigizK/GigaAM-Bashkir-CV25-ONNX")
print(model.recognize("bashkir_audio.wav"))
import onnx_asr
model = onnx_asr.load_model("AigizK/GigaAM-Bashkir-CV25-ONNX", quantization="int8")
print(model.recognize("bashkir_audio.wav"))
import onnx_asr
model = onnx_asr.load_model(
"AigizK/GigaAM-Bashkir-CV25-ONNX",
providers=["CUDAExecutionProvider", "CPUExecutionProvider"],
)
print(model.recognize("bashkir_audio.wav"))
Dynamic INT8 contains ConvInteger/MatMulInteger operators and is intended
for CPU. Use FP32 with the CUDA Execution Provider on NVIDIA GPUs.
Passing a list performs one padded batch and is substantially faster on GPU:
texts = model.recognize([
"audio_01.wav",
"audio_02.wav",
"audio_03.wav",
"audio_04.wav",
])
for text in texts:
print(text)
Group recordings of similar duration to reduce padding overhead.
import onnx_asr
import onnxruntime as ort
options = ort.SessionOptions()
options.intra_op_num_threads = 16
options.inter_op_num_threads = 1
model = onnx_asr.load_model(
"AigizK/GigaAM-Bashkir-CV25-ONNX",
quantization="int8",
providers=["CPUExecutionProvider"],
sess_options=options,
)
from concurrent.futures import ThreadPoolExecutor
files = ["audio_01.wav", "audio_02.wav", "audio_03.wav", "audio_04.wav"]
with ThreadPoolExecutor(max_workers=4) as pool:
texts = list(pool.map(model.recognize, files))
For maximum GPU throughput, prefer a real batch over concurrent batch-1 calls.
The built-in path reader accepts mono PCM WAV. Decode MP3/FLAC with an audio library and pass a float32 NumPy array:
import soundfile as sf
waveform, sample_rate = sf.read("bashkir_audio.flac", dtype="float32")
text = model.recognize(waveform, sample_rate=sample_rate, channel="mean")
print(text)
timestamped_model = model.with_timestamps()
result = timestamped_model.recognize("bashkir_audio.wav")
print(result.text)
print(result.tokens)
print(result.timestamps)
print(result.logprobs)
import onnx_asr
vad = onnx_asr.load_vad("silero")
longform_model = model.with_vad(vad)
for segment in longform_model.recognize("long_bashkir_audio.wav"):
print(segment.start, segment.end, segment.text)
onnx-asr AigizK/GigaAM-Bashkir-CV25-ONNX bashkir_audio.wav
onnx-asr accepts mono PCM WAV paths directly. It also accepts a float32 NumPy
waveform and a sample_rate argument when audio is decoded by another library.
The output is lowercase Bashkir text without punctuation.
Higher × realtime is better: 100× means 100 seconds of audio are processed
in one second. Audio was decoded to mono 16 kHz and preloaded into RAM. Timed
sections include feature extraction, ONNX inference, and greedy CTC decoding;
Hub download, model loading/graph optimization, MP3 decoding, and disk I/O are
excluded.
Hardware and software:
onnx-asr 0.12.0, ONNX Runtime 1.23.2, Python 3.11Same 96 clips / 466.704 seconds of audio for every row. CPU uses 32 ONNX Runtime intra-op threads. GPU uses the CUDA Execution Provider.
| Runtime | Batch | Clips/s | Audio speed | p50 batch latency |
|---|---|---|---|---|
| CPU FP32 | 1 | 6.9 | 33.7× | 138.1 ms |
| CPU FP32 | 8 | 6.9 | 33.6× | 1213.8 ms |
| CPU FP32 | 32 | 7.5 | 36.5× | 4103.1 ms |
| CPU INT8 | 1 | 6.3 | 30.4× | 149.2 ms |
| CPU INT8 | 8 | 4.9 | 23.8× | 1659.3 ms |
| CPU INT8 | 32 | 4.8 | 23.5× | 6590.4 ms |
| RTX 3090 FP32 | 1 | 14.3 | 69.7× | 67.9 ms |
| RTX 3090 FP32 | 8 | 110.2 | 535.7× | 74.4 ms |
| RTX 3090 FP32 | 32 | 153.3 | 745.1× | 202.5 ms |
| RTX 5090 FP32 | 1 | 23.8 | 115.9× | 40.3 ms |
| RTX 5090 FP32 | 8 | 178.6 | 868.3× | 46.6 ms |
| RTX 5090 FP32 | 32 | 379.3 | 1844.0× | 86.0 ms |
Batch size 8; same 24 clips / 117.324 seconds of audio.
| ORT threads | FP32 | INT8 |
|---|---|---|
| 1 | 5.2× | 5.0× |
| 2 | 9.6× | 8.8× |
| 4 | 17.2× | 14.1× |
| 8 | 26.5× | 19.8× |
| 16 | 34.1× | 24.3× |
| 32 | 38.0× | 27.6× |
One shared model, Python ThreadPoolExecutor, same 32 clips / 158.580 seconds.
CPU sessions use 8 intra-op threads.
| Runtime | 1 worker | 2 workers | 4 workers |
|---|---|---|---|
| CPU FP32 | 29.0× | 41.0× | 54.4× |
| CPU INT8 | 24.9× | 40.5× | 58.6× |
| RTX 3090 FP32 | 76.6× | 101.5× | 143.8× |
| RTX 5090 FP32 | 129.1× | 154.1× | 203.0× |
Key observations:
Full-precision values and methodology are in benchmark_results.json; the
reproducible runner is benchmark_onnx.py.
multilingual_bashkir_ctc.onnx: FP32 encoder and 43-class CTC head.multilingual_bashkir_ctc.int8.onnx: dynamic unsigned INT8 quantization for CPU.multilingual_vocab.txt: 42 Bashkir characters plus CTC blank at index 42.config.json: model configuration used by onnx-asr.benchmark_results.json: complete CPU/GPU benchmark output.benchmark_onnx.py: reproducible benchmark runner.INT8 was produced with ONNX Runtime dynamic quantization, using unsigned 8-bit weights and activations with per-tensor scales. FP32 was evaluated with the CUDA Execution Provider; INT8 was evaluated with the CPU Execution Provider.
MIT License. Commercial use, modification, redistribution, and private use are permitted. Retain the copyright and license notice when redistributing.