Skip to main content

balbal

Open Turkish speech recognition that runs on a CPU.

pip install balbal
balbal run speech.wav

The first run downloads the model from Hugging Face (balbal-v2: ~590 MB, once); later runs start from the local cache.

Model Parameters Languages Mu-Bench WER / sigWER Speed (8 CPU threads)
balbal-v2 (default) 45.4M Turkish 9.46% / 18.44% 236x real time
balbal-v2-manas 313.3M Turkish, English 8.20% / 14.89% 123x real time

Output: cased, punctuated text with per-word timestamps; spoken numbers come out as digits.

Command line

balbal run speech.wav                         # text
balbal run --model manas a.wav b.mp3          # balbal-v2-manas; MP3 / M4A / video through FFmpeg
balbal run --json speech.wav                  # one JSON line per file: text, words with start / end seconds, timings
balbal run --hotwords "Eray,Hasan" call.wav   # favour names / words you expect in the audio
balbal run --no-itn speech.wav                # keep numbers as spoken words
balbal download --model manas                 # fetch the model files now

--threads sets the CPU threads (default BALBAL_THREADS, else up to 8).

Python

import balbal

print(balbal.transcribe('speech.wav')['text'])

model = balbal.load('balbal-v2-manas')          # load once, reuse
result = model.transcribe('call.wav', hotwords=['Eray'])
for w in result['words']:
    print(w['start'], w['end'], w['word'])

model.transcribe(samples, sample_rate=8000)      # a NumPy waveform at any sample rate

transcribe returns text, words (word, start, end in seconds), duration_seconds, inference_seconds and realtime_factor. Audio longer than 30 s is cut into 30 s chunks. One Model per thread.

Platform

Linux x86-64, Python 3.11 or 3.12. The wheel carries the native beam-search decoder and the custom onnxruntime operators of the fast graph (built for x86-64-v2, AVX2 and AVX-512 CPUs, chosen at run time). runtime='onnx' (--runtime onnx) runs the standard-operator graph instead.

Files go to ~/.cache/huggingface/balbal/ (HF_HOME, BALBAL_CACHE or cache_dir= move it). The model revisions are pinned to the ones this release was tested with; revision='main' takes the latest upload.

The code is Apache-2.0. The model weights have their own license (balbal Community License 1.0, on the model pages).

Metadata

Release files for balbal 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for balbal 0.1.0
File Interpreter ABI Platform Actions
balbal-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for balbal-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
balbal-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for balbal-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 724.8 kB

Release files / balbal-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL balbal-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 365.4 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b2f1afeb082da66e60a605eb907e088d4413af5fb5dcc66905ea679cc039d113
BLAKE2b-256 checksum
How to use checksums
2212407bd1798aafe4a2b1a93c18c10bd432ee7347c9cde42851a6d2e7bbb6e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / balbal-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL balbal-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 359.4 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4c99ac3d39f2d413408c7fa339609300f548f9d185acfa63134fed8f89029113
BLAKE2b-256 checksum
How to use checksums
3e1dc19bdb3dc8c6c1800e840f3d85c56a9a9335189cacc2e4c5b5b37490b8ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for balbal 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page