skillfed

torchaudio

An audio package for PyTorch

torchaudio v2.11.0 12.3M downloads/30d#1,325 on PyPI2,924
Permissive license Active released

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 torchaudio

uv

uv add torchaudio

poetry

poetry add torchaudio

Installing 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

Environment :: PluginsIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: C++Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Multimedia :: Sound/AudioTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

pytorch audio processingaudio transforms spectrogram mfccaudio machine learning librarygpu accelerated audiospeech processing pytorchaudio dataset loadersmel spectrogram pytorch
audio-mlgpu-acceleratedpytorch-extension

More Artificial Intelligence packages

Further reading