Building on Linux and macOS

1. Install Conda and activate conda environment

Please folllow the instruction at

2. Install PyTorch

Please select the version of PyTorch you want to install from

Here, we install nightly build.

conda install pytorch -c pytorch-nightly

3. Install build tools

conda install cmake ninja pkg-config

4. Install external dependencies

conda install -c conda-forge ffmpeg

5. Clone the torchaudio repository

git clone
cd audio

6. Build

USE_FFMPEG=1 python develop


Due to the complexity of build process, TorchAudio only supports in-place build. To use pip, please use --no-use-pep517 option.

USE_FFMPEG=1 pip install -v -e . --no-use-pep517


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources