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 read in overlapping windows whose CTC frames are stitched into one sequence and decoded in one KenLM pass, so no word is cut at a window edge. 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.1

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.1
File Interpreter ABI Platform Actions
balbal-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for balbal-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
balbal-0.1.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 728.5 kB

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

Download URL balbal-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 367.2 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4f44dd0e2036656421ebbc0ce7398d86942166316994ff49cd9b5e8d2add2f5f
BLAKE2b-256 checksum
How to use checksums
26cc49424c30ef320cd26f6ea4e9deba599485d990e4b468947787453cf0847f
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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL balbal-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 361.3 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6cd913b829a8bc142645daace4ae7f0f2b25401877cf9701e6f37941ffcb0dee
BLAKE2b-256 checksum
How to use checksums
e94f69f18d1b684c62b341e5970b38658799ed8640a477ea6f438db2deae5095
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.1

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