lhotse
Data preparation for speech processing models training.
Decision gist · record as of 2026-08-14
Yes. Lhotse is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and solves a real problem in multimodal data preparation for speech and audio ML. The low install friction and permissive license make it accessible. Install it if you are building speech, audio, or multimodal training pipelines; skip it if you only need simple audio I/O without data augmentation or complex dataset orchestration.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch and audio backend libraries (audioread, SoundFile).
- The environment variable LHOTSE_REQUIRE_TORCHAUDIO controls whether torchaudio is enforced; basic audio reading works without it via SoundFile.
- Low friction: pure Python wheel with 11 runtime dependencies including torch, numpy, and audio libraries.
License · maintenance · safety
Apache-2.0 License (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for research and production ML workflows.
last release 2026-04-20 (116 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,304,236 downloads/mo, #4,082 on PyPI
Alternatives
Verify before relying
pip install lhotse
from lhotse import CutSet, Recording, SupervisionSegment
# Load or create cuts and prepare data
cuts = CutSet.from_json('cuts.json')
for batch in cuts.to_torch():
# Use batch for training
pass- Whether torchaudio is a hard requirement or optional (environment variable LHOTSE_REQUIRE_TORCHAUDIO suggests it may be optional)
- Performance characteristics when handling large-scale multimodal datasets
- Compatibility details with specific PyTorch versions beyond the general torch dependency
What it is and what it does
Lhotse is a Python library for preparing multimodal data (speech, audio, video, image, text) for training machine learning models. It sits alongside k2 as part of the next-generation Kaldi speech processing ecosystem. The library introduces the concept of audio cuts—logical segments that can be mixed, truncated, and padded on-the-fly—to minimize storage while supporting flexible training data construction. It handles data randomization and de-duplication for distributed training, provides standard recipes for common corpora, and integrates with PyTorch through task-specific Dataset classes.
Lhotse supports both pre-computed feature storage (with optional compression via lilcom) and on-the-fly feature extraction and augmentation. Data and metadata are stored in human-readable text manifests and exposed through convenient Python classes. The library offers efficient sequential I/O formats (Lhotse Shar, similar to webdataset) and state-of-the-art dataloading algorithms like dataset blending and bucketing. It runs on Python 3.8+ across Linux, macOS, and Windows, with dependencies on torch, numpy, audioread, SoundFile, and other standard tools.
Use it for
- Prepare speech recognition training datasets with on-the-fly mixing and augmentation to reduce storage overhead.
- Build multimodal pipelines combining audio, text, image, and video for end-to-end model training.
- Implement distributed multi-node training with data randomization and de-duplication across workers.
- Create standard data recipes for common speech corpora to streamline reproducible research.
- Combine multiple datasets with flexible blending and bucketing for efficient batching during training.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Lhotse is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and solves a real problem in multimodal data preparation for speech and audio ML. The low install friction and permissive license make it accessible. Install it if you are building speech, audio, or multimodal training pipelines; skip it if you only need simple audio I/O without data augmentation or complex dataset orchestration.
Install
lhotse on PyPI
Before you install
Low friction: pure Python wheel with 11 runtime dependencies including torch, numpy, and audio libraries. Actively maintained with recent release. Requires Python 3.8 or later.
Requires torch and audio backend libraries (audioread, SoundFile). The environment variable LHOTSE_REQUIRE_TORCHAUDIO controls whether torchaudio is enforced; basic audio reading works without it via SoundFile.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for research and production ML workflows.
Quickstart
pip install lhotse
from lhotse import CutSet, Recording, SupervisionSegment
# Load or create cuts and prepare data
cuts = CutSet.from_json('cuts.json')
for batch in cuts.to_torch():
# Use batch for training
pass
Verify before relying
- Whether torchaudio is a hard requirement or optional (environment variable LHOTSE_REQUIRE_TORCHAUDIO suggests it may be optional)
- Performance characteristics when handling large-scale multimodal datasets
- Compatibility details with specific PyTorch versions beyond the general torch dependency
Package facts
| License | Apache-2.0 License permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 11 packagesaudioreadSoundFileclickcytoolzintervaltreenumpypackagingpyyamltabulatetorchtqdm |
| Maintenance | Actively maintained 116 days since the last release |
| First released | |
| Downloads | 1,304,236 / month, #4,082 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Sound/Audio :: SpeechTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: lhotse-1.33.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “speech audio data preparation”
- lhotseLhotse prepares multimodal (speech, audio, video, image, text) data…
- deepfilternetDeepFilterNet removes background noise from full-band audio at 48kHz…
- openai-whisperWhisper performs multilingual speech recognition, speech translation,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also openai-whisper · torchaudio · kokoro · silero · speechbrain · mlx-audio · kaldi-native-fbank · transformers · omnivoice · pyannote-database