torch-audiomentations
A Pytorch library for audio data augmentation. Inspired by audiomentations. Useful for deep learning.
Decision gist · record as of 2026-08-14
Yes, if you are training audio models with PyTorch and need GPU-accelerated augmentation. The library is mature enough for production use (1164 GitHub stars, top 5000 PyPI packages), has no known vulnerabilities, and offers a permissive license. However, be aware that maintenance is aging (last release 576 days ago), multiprocessing and multi-GPU setups have known limitations, and some transforms have edge cases (e.g., PitchShift at low sample rates). For single-GPU training on CPU or GPU, it is a solid choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch and torchaudio installed; multiprocessing contexts may cause memory leaks and multi-GPU/DDP is not officially supported.
- Low friction install with a pure Python wheel.
- Maintenance status is aging—last release was 576 days ago—but the repository remains active with recent commits and no archived status.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects without restriction or attribution requirement.
last release 2025-01-15 (576 days) · last repo commit 2025-11-24 · 1,164 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,125,883 downloads/mo, #3,273 on PyPI
Alternatives
Verify before relying
pip install torch-audiomentations
import torch
from torch_audiomentations import Compose, Gain, PolarityInversion
apply_augmentation = Compose([
Gain(min_gain_in_db=-15.0, max_gain_in_db=5.0, p=0.5),
PolarityInversion(p=0.5)
])
audio_samples = torch.rand(8, 2, 32000, dtype=torch.float32) - 0.5
perturbed = apply_augmentation(audio_samples, sample_rate=16000)- Whether PitchShift limitations (small shifts at low sample rates) affect your intended use case.
- Performance characteristics of specific transforms on your hardware (GPU speedup varies by transform).
- Stability of target data processing, still marked experimental in the documentation.
What it is and what it does
torch-audiomentations is a PyTorch library for augmenting audio data during training. It provides a collection of transforms—gain adjustment, filtering, pitch shifting, noise addition, and more—that extend nn.Module and can be composed into a pipeline. Most transforms are differentiable and support batches of multichannel audio, running efficiently on both CPU and GPU. The library is designed to avoid becoming a bottleneck in model training.
The transforms support three application modes (per_batch, per_example, per_channel) and probability-based triggering, giving fine control over how augmentation is applied to different samples in a batch. It is inspired by the audiomentations library but optimized for PyTorch workflows. The package is in early development (alpha status), so APIs may change, and some features like target data processing and multi-GPU support remain experimental or unsupported.
Use it for
- Augment audio batches during training of speech recognition or audio classification models to improve robustness.
- Apply differentiable transforms as part of an end-to-end learnable audio processing pipeline.
- Add background noise, pitch variation, or filtering to synthetic training data for audio ML tasks.
- Accelerate augmentation on GPU to reduce training bottlenecks when processing large audio datasets.
- Compose multiple transforms (gain, filtering, polarity inversion) into a single augmentation routine.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are training audio models with PyTorch and need GPU-accelerated augmentation.
The library is mature enough for production use (1164 GitHub stars, top 5000 PyPI packages), has no known vulnerabilities, and offers a permissive license. However, be aware that maintenance is aging (last release 576 days ago), multiprocessing and multi-GPU setups have known limitations, and some transforms have edge cases (e.g., PitchShift at low sample rates). For single-GPU training on CPU or GPU, it is a solid choice.
Install
torch-audiomentations on PyPI
Before you install
Low friction install with a pure Python wheel. Maintenance status is aging—last release was 576 days ago—but the repository remains active with recent commits and no archived status. The four runtime dependencies (torch, torchaudio, julius, torch-pitch-shift) are standard in audio ML workflows.
Requires torch and torchaudio installed; multiprocessing contexts may cause memory leaks and multi-GPU/DDP is not officially supported.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects without restriction or attribution requirement.
Quickstart
pip install torch-audiomentations
import torch
from torch_audiomentations import Compose, Gain, PolarityInversion
apply_augmentation = Compose([
Gain(min_gain_in_db=-15.0, max_gain_in_db=5.0, p=0.5),
PolarityInversion(p=0.5)
])
audio_samples = torch.rand(8, 2, 32000, dtype=torch.float32) - 0.5
perturbed = apply_augmentation(audio_samples, sample_rate=16000)
Verify before relying
- Whether PitchShift limitations (small shifts at low sample rates) affect your intended use case.
- Performance characteristics of specific transforms on your hardware (GPU speedup varies by transform).
- Stability of target data processing, still marked experimental in the documentation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesjuliustorchtorchaudiotorch-pitch-shift |
| Maintenance | Aging 576 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,125,883 / month, #3,273 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: MultimediaTopic :: Multimedia :: Sound/AudioTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: torch_audiomentations-0.12.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 › “pytorch audio augmentation”
- torch-audiomentationsProvides PyTorch-native audio data augmentation transforms that run…
- nlpaugnlpaug generates synthetic augmented text and audio data for machine…
- lhotseLhotse prepares multimodal (speech, audio, video, image, text) data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also audiomentations · asteroid-filterbanks · ttach · batchgeneratorsv2 · descript-audiotools · torch · nlpaug · batchgenerators · torchlibrosa · pedalboard