Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
cuda-version: ["12.8"]
cuda-version: ["13.0"]
ffmpeg-version: ["8"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest-linux-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
cuda-version: ["12.8"]
cuda-version: ["13.0"]
ffmpeg-version: ["7"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
Expand Down
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ torchaudio: an audio library for PyTorch

![TorchAudio Logo](docs/source/_static/img/logo.png)

> [!IMPORTANT]
> **TorchAudio 2.11 works with `torch` 2.11 and with every future `torch`
> release (2.12, 2.13, etc.).** It is the latest release, and it is the only
> one you need: there is nothing to upgrade in TorchAudio when you upgrade
> `torch`, and installing TorchAudio does not pin `torch` to a specific
> version.

> [!NOTE]
> **We have transitioned TorchAudio into a
> maintenance phase. This process removed some user-facing
> features. These features were deprecated from TorchAudio 2.8 and removed in 2.9.
> Our main goals were to reduce redundancies with the rest of the
> PyTorch ecosystem, make it easier to maintain, and create a version of
> TorchAudio that is more tightly scoped to its strengths: processing audio
> data for ML. Please see
> [our community message](https://github.com/pytorch/audio/issues/3902)
> for more details.**
> We have transitioned TorchAudio into a maintenance phase. This migration
> process removed some user-facing features. These features were deprecated
> from TorchAudio 2.8 and removed in 2.9.
> Our main goals were to reduce redundancies with the rest of the
> PyTorch ecosystem, make it easier to maintain, and create a version of
> TorchAudio that is more tightly scoped to its strengths: processing audio
> data for ML. Please see
> [our community message](https://github.com/pytorch/audio/issues/3902)
> for more details.

The aim of torchaudio is to apply [PyTorch](https://github.com/pytorch/pytorch) to
the audio domain. By supporting PyTorch, torchaudio follows the same philosophy
Expand All @@ -38,7 +45,16 @@ to use and feel like a natural extension.
Installation
------------

Please refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio.
```bash
pip install torchaudio
```

TorchAudio 2.11 requires `torch` 2.11 or newer, including all future releases.
It does not pin `torch` to a specific version.

Please refer to https://pytorch.org/audio/main/installation.html for the full
installation and build instructions, and for the compatibility matrix of older
releases.


API Reference
Expand Down
17 changes: 3 additions & 14 deletions docs/source/build.jetson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,7 @@ Verify the installation by checking the version and CUDA device accessibility.

pip install ninja

2. Install dependencies
~~~~~~~~~~~~~~~~~~~~~~~

.. code-block::

sudo apt install libavformat-dev libavcodec-dev libavutil-dev libavdevice-dev libavfilter-dev

3. Build TorchAudio
2. Build TorchAudio
~~~~~~~~~~~~~~~~~~~

.. code-block::
Expand All @@ -139,7 +132,7 @@ Verify the installation by checking the version and CUDA device accessibility.
cd audio
USE_CUDA=1 pip install -v -e . --no-use-pep517

4. Check the installation
3. Check the installation
~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block::
Expand All @@ -150,8 +143,4 @@ Verify the installation by checking the version and CUDA device accessibility.

.. code-block::

2.0.0a0+2ead941
--prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared

.. image:: https://download.pytorch.org/torchaudio/doc-assets/jetson-verify-build.png
:width: 360px
2.11.0a0+2ead941
58 changes: 43 additions & 15 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
Installing pre-built binaries
=============================

``torchaudio`` has binary distributions for PyPI (``pip``) and Anaconda (``conda``).
``torchaudio`` has binary distributions on PyPI:

Please refer to https://pytorch.org/get-started/locally/ for the details.
.. code-block::

.. note::
pip install torchaudio

Each ``torchaudio`` package is compiled against specific version of ``torch``.
Please refer to the following table and install the correct pair of ``torch`` and ``torchaudio``.
To install a specific variant (CUDA, ROCm, nightly, ...), please refer to
https://pytorch.org/get-started/locally/.

.. note::
.. important::

Starting ``0.10``, torchaudio has CPU-only and CUDA-enabled binary distributions,
each of which requires a corresponding PyTorch distribution.
**TorchAudio 2.11 works with PyTorch 2.11 and with every future PyTorch
release (2.12, 2.13, ...).**

Dependencies
------------

* `PyTorch <https://pytorch.org>`_

Please refer to the compatibility matrix bellow for supported PyTorch versions.
2.11 or newer for TorchAudio 2.11. For older TorchAudio releases, please
refer to the :ref:`compatibility matrix <compatibility_matrix>` below.

.. _optional_dependencies:

Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~

* `torchcodec <https://github.com/pytorch/torchcodec>`__

Required by :func:`torchaudio.load` and :func:`torchaudio.save`, which are
thin wrappers around TorchCodec's ``AudioDecoder`` and ``AudioEncoder``.
We recommend using those TorchCodec classes directly. Installation
instructions are at
https://github.com/pytorch/torchcodec#installing-torchcodec.

* `sentencepiece <https://pypi.org/project/sentencepiece/>`__

Expand All @@ -37,23 +45,43 @@ Optional Dependencies

Required for performing text-to-speech with :ref:`Tacotron2`.


.. _compatibility_matrix:

Compatibility Matrix
--------------------

The official binary distributions of TorchAudio contain extension modules
which are written in C++ and linked against specific versions of PyTorch.

TorchAudio and PyTorch from different releases cannot be used together.
Please refer to the following table for the matching versions.
TorchAudio 2.11 is built against PyTorch's stable ABI and therefore supports
PyTorch 2.11 and all later versions. Earlier TorchAudio releases contain
extension modules linked against a single PyTorch version, and cannot be mixed
with a different PyTorch release.

.. list-table::
:header-rows: 1

* - ``PyTorch``
- ``TorchAudio``
- ``Python``
* - ``2.11`` **and above**
- ``2.11.0``
- ``>=3.10``, ``<=3.14``
* - ``2.10``
- ``2.10.0``
- ``>=3.10``, ``<=3.14``
* - ``2.9.1``
- ``2.9.1``
- ``>=3.10``, ``<=3.14``
* - ``2.9``
- ``2.9.0``
- ``>=3.10``, ``<=3.14``
* - ``2.8``
- ``2.8.0``
- ``>=3.9``, ``<=3.13``
* - ``2.7.1``
- ``2.7.1``
- ``>=3.9``, ``<=3.13``
* - ``2.7``
- ``2.7.0``
- ``>=3.9``, ``<=3.13``
* - ``2.6``
- ``2.6.0``
- ``>=3.9``, ``<=3.13``
Expand Down
3 changes: 3 additions & 0 deletions examples/tutorials/tacotron2_pipeline_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,14 @@ def plot(waveforms, spec, sample_rate):

# Workaround to load model mapped on GPU
# https://stackoverflow.com/a/61840832
# trust_repo=True is needed for non-interactive environments: torch.hub otherwise
# prompts on stdin for repos outside its trusted-owner list, which hangs forever.
waveglow = torch.hub.load(
"NVIDIA/DeepLearningExamples:torchhub",
"nvidia_waveglow",
model_math="fp32",
pretrained=False,
trust_repo=True,
)
checkpoint = torch.hub.load_state_dict_from_url(
"https://api.ngc.nvidia.com/v2/models/nvidia/waveglowpyt_fp32/versions/1/files/nvidia_waveglowpyt_fp32_20190306.pth", # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
torch

# Optional runtime dependencies
SoundFile
torchcodec

# For build and test-time dependencies please refer to CONTRIBUTING.md
Loading