kaldiio
Kaldi-ark loading and writing module
What it is and what it does
Kaldiio is a pure-Python library for reading and writing Kaldi archive and script files, which are standard formats in speech recognition and audio processing workflows. It handles Kaldi matrices and vectors in binary, text, and compressed formats, and can read/write wav.scp files and work with pipes for streaming data. The library depends only on numpy and provides high-level helpers (ReadHelper, WriteHelper) that abstract away low-level format details, letting you iterate over utterance-keyed data or write batches without worrying whether the underlying format is compressed or text.
Kaldiio is designed for researchers and engineers working with Kaldi-based speech systems or audio feature pipelines. Unlike some alternatives that require C++ bindings, it is pure Python and thus easier to install and deploy. It supports sequential reading and writing, pipe-based I/O for integration with Unix tools, and extended formats (numpy, pickle, FLAC) beyond standard Kaldi types. The aging maintenance status suggests the core functionality is stable but new features are unlikely.
Use it for:
- Load pre-computed acoustic features (MFCC, fbank) from Kaldi ark/scp files for training neural networks.
- Write neural network outputs back to Kaldi-compatible ark/scp format for downstream Kaldi decoding.
- Stream compressed or gzipped Kaldi archives via pipes in speech recognition pipelines.
- Read alignment (ali) files and utterance-indexed features for supervised learning workflows.
- Convert between Kaldi archive formats and extended formats (numpy, pickle) for research prototyping.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Kaldiio reads and writes Kaldi archive (ark) and script (scp) files in pure Python, handling matrices, vectors, and audio data with support for binary, text, and compressed formats.
Yes, if you work with Kaldi-based speech systems or need to read/write Kaldi archive formats in Python. The pure-Python implementation, low install friction, and stable feature set make it a practical choice for that niche. However, verify the license status before use in proprietary contexts, and note that maintenance is aging—critical bug fixes may be slow. If you need C++ performance or full Kaldi feature coverage, consider kaldi_native_io instead.
Install
kaldiio on PyPI
pip
pip install kaldiiouv
uv add kaldiiopoetry
poetry add kaldiioInstalling kaldiio
Before you install
Low install friction with a single runtime dependency (numpy). The package is in aging maintenance status with a last commit on 2025-03-06, though the repository remains active and not archived.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the metadata. Verify the actual license before use in proprietary or restricted contexts.
Quickstart
pip install kaldiio
from kaldiio import ReadHelper
with ReadHelper('scp:file.scp') as reader:
for key, numpy_array in reader:
print(key, numpy_array.shape)
Verify before relying
- Whether the unclear license status reflects a genuine licensing gap or a metadata omission in the package metadata.
- Current compatibility with Kaldi versions beyond those tested during development.
- Performance characteristics when handling very large ark files or streaming from pipes.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | aging — 526 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,180,709/month — #4,258 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kaldiio-2.18.1-py3-none-any.whl
Tags
More Analysis packages
Pydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
librosalibrosa provides audio and music signal…
permissive · top 5,000 on PyPI
soxrPerforms high-quality sample-rate conversion…
copyleft · top 5,000 on PyPI
moviepyMoviePy is a Python library for video editing…
permissive · top 5,000 on PyPI
tinytagReads metadata (artist, title, duration,…
permissive · top 5,000 on PyPI
mir-evalmir_eval computes standard accuracy metrics for…
permissive · top 15,000 on PyPI
kaldi-python-ioReads and writes Kaldi binary archives,…
permissive · top 15,000 on PyPI
kaldifstPython wrapper for OpenFst and Kaldi…
permissive · top 15,000 on PyPI
fastavrofastavro reads and writes Apache Avro files…
permissive · top 1,000 on PyPI
audiofileReads and writes audio files across formats…
permissive · top 15,000 on PyPI
kaldi-native-fbankExtracts Kaldi-compatible filterbank (fbank)…
permissive · top 15,000 on PyPI
soundfileReads and writes audio files in formats like…
permissive · top 1,000 on PyPI
rosbagsRead, write, convert, and deserialize ROS bag…
permissive · top 15,000 on PyPI
scpProvides file transfer over SSH using the SCP…
copyleft · top 5,000 on PyPI
tomlrtReads and writes TOML files while preserving…
permissive · top 15,000 on PyPI
kaldialignComputes edit distance, alignment, and word…
permissive · top 15,000 on PyPI