torchaudio
An audio package for PyTorch
What it is and what it does
torchaudio is a PyTorch extension for audio and speech processing designed specifically for machine learning workflows. It provides GPU-accelerated audio transforms (Spectrogram, MelSpectrogram, MFCC, MuLawEncoding/Decoding, Resample), dataloaders for common audio datasets, forced alignment, and compliance interfaces that align with other libraries like Kaldi. All computations use PyTorch operations, making it feel like a natural extension of the PyTorch ecosystem with full autograd support for trainable features.
The library transitioned into maintenance phase starting with version 2.8, removing redundant features to reduce scope and focus on its core strength: processing audio data for ML. It is not a general signal-processing library but rather a specialized tool for building audio-based machine learning models. It supports modern Python versions (3.10–3.14) across macOS, Linux, and Windows, with compiled wheels for efficient installation.
Use it for:
- Build end-to-end speech recognition or audio classification models with GPU acceleration and automatic differentiation.
- Load and preprocess standard audio datasets (with built-in dataloaders) for training neural networks.
- Apply common audio transforms (spectrograms, mel-frequency cepstral coefficients, resampling) as differentiable layers in PyTorch models.
- Align audio with transcriptions using forced alignment for speech processing pipelines.
- Ensure compatibility with Kaldi-based audio processing through compliance interfaces.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides PyTorch-based audio processing, transforms, and dataloaders for machine learning tasks, with GPU acceleration and autograd support for trainable audio features.
Yes, if you are building audio or speech ML models with PyTorch and need GPU acceleration and autograd support. The permissive BSD license and active maintenance are favorable. Be aware that it is in maintenance mode (feature removals since 2.8), so verify that remaining APIs match your needs. Install friction is moderate due to compiled wheels, but pre-built distributions are available for common platforms and Python versions.
Install
torchaudio on PyPI
pip
pip install torchaudiouv
uv add torchaudiopoetry
poetry add torchaudioInstalling torchaudio
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms (3.10–3.14, macOS ARM64/x86_64, Linux aarch64/x86_64, Windows). Active maintenance with recent releases; in maintenance phase since 2.8 with feature removals to reduce redundancy and scope.
License in practice
Permissive license (BSD) allows commercial and private use. Pre-trained models may have separate licenses (e.g., SquimSubjective under CC-BY-NC 4.0); users are responsible for verifying dataset and model permissions.
Quickstart
pip install torchaudio
import torchaudio
waveform, sample_rate = torchaudio.load('audio.wav')
spectrogram = torchaudio.transforms.Spectrogram()(waveform)
Requires PyTorch to be installed separately; compiled wheels require compatible Python version (3.10–3.14) and platform (macOS, Linux, Windows).
Verify before relying
- Whether PyTorch is automatically installed as a dependency or must be installed separately.
- Specific performance characteristics or benchmarks for GPU acceleration on different hardware.
- Current scope and API stability after transition to maintenance phase in version 2.8.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 144 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,339,584/month — #1,325 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: torchaudio-2.11.0-cp310-cp310-macosx_11_0_arm64.whl; torchaudio-2.11.0-cp310-cp310-manylinux_2_28_aarch64.whl; torchaudio-2.11.0-cp310-cp310-manylinux_2_28_x86_64.whl; torchaudio-2.11.0-cp310-cp310-win_amd64.whl; torchaudio-2.11.0-cp311-cp311-macosx_11_0_arm64.whl; torchaudio-2.11.0-cp311-cp311-manylinux_2_28_aarch64.whl; torchaudio-2.11.0-cp311-cp311-manylinux_2_28_x86_64.whl; torchaudio-2.11.0-cp311-cp311-win_amd64.whl; torchaudio-2.11.0-cp312-cp312-macosx_11_0_arm64.whl; torchaudio-2.11.0-cp312-cp312-manylinux_2_28_aarch64.whl; torchaudio-2.11.0-cp312-cp312-manylinux_2_28_x86_64.whl; torchaudio-2.11.0-cp312-cp312-win_amd64.whl; torchaudio-2.11.0-cp313-cp313-macosx_12_0_arm64.whl; torchaudio-2.11.0-cp313-cp313-manylinux_2_28_aarch64.whl; torchaudio-2.11.0-cp313-cp313-manylinux_2_28_x86_64.whl; torchaudio-2.11.0-cp313-cp313t-macosx_12_0_arm64.whl; torchaudio-2.11.0-cp313-cp313t-manylinux_2_28_aarch64.whl; torchaudio-2.11.0-cp313-cp313t-manylinux_2_28_x86_64.whl; torchaudio-2.11.0-cp313-cp313t-win_amd64.whl; torchaudio-2.11.0-cp313-cp313-win_amd64.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
s3tokenizerConverts audio into discrete semantic speech…
permissive · top 15,000 on PyPI
torchlibrosaProvides PyTorch implementations of librosa…
permissive · top 15,000 on PyPI
lhotseLhotse prepares multimodal (speech, audio,…
permissive · top 5,000 on PyPI
python_speech_featuresExtracts speech features from audio signals for…
permissive · top 15,000 on PyPI
openunmixSeparates music into individual stems (vocals,…
permissive · top 15,000 on PyPI
GammatoneApplies banks of gammatone filters to audio…
unclear · top 15,000 on PyPI
deepfilternetDeepFilterNet removes background noise from…
permissive · top 15,000 on PyPI
laion-clapExtracts learned audio and text embeddings…
permissive · top 15,000 on PyPI
torchtexttorchtext provides text datasets, preprocessing…
permissive · top 15,000 on PyPI
torchcrepePyTorch implementation of the CREPE pitch…
permissive · top 15,000 on PyPI