torchlibrosa
PyTorch implemention of part of librosa functions.
Decision gist · record as of 2026-08-14
Yes, if you need GPU-accelerated librosa-compatible audio features and can tolerate dormant maintenance. The low install friction and permissive license make it practical for GPU-accelerated audio feature extraction. However, verify that PyTorch is available in your environment, and be aware that no updates have shipped since 2023-02-21—if you encounter bugs or incompatibilities with newer dependency versions, you may need to fork or patch locally.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PyTorch (not listed as explicit dependency but core to all usage); librosa and numpy must be installed.
- Low friction: pure Python wheel with only numpy and librosa as runtime dependencies.
- Maintenance is dormant—last release was 2023-02-21, over 1270 days ago—but the repository remains unarchived with 512 stars.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) poses no restrictions on use, modification, or redistribution in proprietary or open-source projects.
last release 2023-02-21 (1270 days) · last repo commit 2024-06-25 · 512 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 250,807 downloads/mo, #8,617 on PyPI
Alternatives
Verify before relying
pip install torchlibrosa
import torchlibrosa as tl
spectrogram_extractor = tl.Spectrogram(n_fft=2048, hop_length=512)
logmel_extractor = tl.LogmelFilterBank(sr=22050, n_mels=128)
features = logmel_extractor(spectrogram_extractor(batch_audio))- Whether PyTorch is declared as a runtime dependency or only as an implicit peer dependency.
- Current numerical compatibility claim (1e-5 difference) still holds given dormant maintenance status since 2023-02-21.
- Whether GPU acceleration is automatic or requires explicit device placement.
What it is and what it does
TorchLibrosa wraps common librosa audio feature extraction operations—spectrogram, log-mel spectrogram, STFT, and ISTFT—as modules that run on GPU. It is designed for workflows where features were previously extracted on CPU with librosa but now need GPU acceleration during training or inference. The package aims for numerical compatibility within 1e-5 of standard librosa output, so switching from librosa to TorchLibrosa should not significantly alter downstream model behavior.
The package exposes module subclasses for each operation, allowing them to be composed into feature extraction pipelines. It depends only on numpy and librosa, making installation straightforward. However, maintenance has been dormant since 2023-02-21, so bug fixes and updates to support newer versions of dependencies may not be forthcoming.
Use it for
- Accelerate mel-spectrogram extraction during model training by moving feature computation to GPU.
- Build end-to-end differentiable audio processing pipelines where spectral features are computed on GPU.
- Replace CPU-based librosa feature extraction in existing codebases with minimal code changes while gaining GPU speedup.
- Implement STFT/ISTFT operations on GPU for real-time audio processing or batch inference.
- Validate audio model robustness by ensuring feature extraction runs identically on CPU and GPU within numerical tolerance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need GPU-accelerated librosa-compatible audio features and can tolerate dormant maintenance.
The low install friction and permissive license make it practical for GPU-accelerated audio feature extraction. However, verify that PyTorch is available in your environment, and be aware that no updates have shipped since 2023-02-21—if you encounter bugs or incompatibilities with newer dependency versions, you may need to fork or patch locally.
Install
torchlibrosa on PyPI
Before you install
Low friction: pure Python wheel with only numpy and librosa as runtime dependencies. Maintenance is dormant—last release was 2023-02-21, over 1270 days ago—but the repository remains unarchived with 512 stars.
Requires PyTorch (not listed as explicit dependency but core to all usage); librosa and numpy must be installed.
License in practice
MIT license (permissive) poses no restrictions on use, modification, or redistribution in proprietary or open-source projects.
Quickstart
pip install torchlibrosa
import torchlibrosa as tl
spectrogram_extractor = tl.Spectrogram(n_fft=2048, hop_length=512)
logmel_extractor = tl.LogmelFilterBank(sr=22050, n_mels=128)
features = logmel_extractor(spectrogram_extractor(batch_audio))
Verify before relying
- Whether PyTorch is declared as a runtime dependency or only as an implicit peer dependency.
- Current numerical compatibility claim (1e-5 difference) still holds given dormant maintenance status since 2023-02-21.
- Whether GPU acceleration is automatic or requires explicit device placement.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpylibrosa |
| Maintenance | Dormant 1,270 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 250,807 / month, #8,617 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: torchlibrosa-0.1.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 › “gpu audio feature extraction”
- torchlibrosaProvides PyTorch implementations of librosa audio feature extraction…
- ResemblyzerResemblyzer generates a 256-value embedding that summarizes voice…
- python_speech_featuresExtracts speech features from audio signals for automatic speech…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also torchaudio · librosa · torchcrepe · asteroid-filterbanks · torchfcpe · torch-stoi · torch-audiomentations · openunmix · torchcodec · nvidia-cublas