--- id: torchlibrosa version: "0.1.0" license: unclear license_treatment: permissive maintenance: dormant --- # torchlibrosa — PyTorch implemention of part of librosa functions. License: permissive · Maintenance: dormant · Downloads: 250.8K/mo ## 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 above — verify before relying. Provides PyTorch implementations of librosa audio feature extraction functions, enabling GPU-accelerated computation of spectrograms, mel-spectrograms, and STFT/ISTFT transforms with numerical compatibility to the original librosa. 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 pip install torchlibrosa uv add torchlibrosa poetry add torchlibrosa ## Installing torchlibrosa 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. 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)) Requires PyTorch (not listed as explicit dependency but core to all usage); librosa and numpy must be installed. 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: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 250.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gpu audio feature extraction, pytorch librosa implementation, spectrogram mel-spectrogram gpu, stft istft pytorch, audio processing acceleration, librosa gpu alternative, audio-processing, gpu-acceleration, feature-extraction [View on SkillFed](https://skillfed.io/packages/torchlibrosa) · [View on PyPI](https://pypi.org/project/torchlibrosa/)