skillfed

kaldiio

Kaldi-ark loading and writing module

kaldiio v2.18.1 1.2M downloads/30d#4,258 on PyPI268
License unclear AGING released

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 kaldiio

uv

uv add kaldiio

poetry

poetry add kaldiio

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Sound/Audio :: Analysis

Tags

kaldi ark scp file ioread write kaldi archiveskaldi matrix vector serializationaudio feature extraction storagekaldi format python reader
kaldi-integrationspeech-processingserialization

More Analysis packages