From 809a4fa796dc2fff822926840ddf964d069e4bac Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Wed, 10 Sep 2025 16:17:45 +0000 Subject: [PATCH] Add torchcodec installation instructions --- src/torchaudio/__init__.py | 2 ++ src/torchaudio/_torchcodec.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/torchaudio/__init__.py b/src/torchaudio/__init__.py index 6b86967c8e..6e2a965297 100644 --- a/src/torchaudio/__init__.py +++ b/src/torchaudio/__init__.py @@ -36,6 +36,7 @@ def load( https://docs.pytorch.org/torchcodec/stable/generated/torchcodec.decoders.AudioDecoder. Because of the reliance on Torchcodec, the parameters ``normalize``, ``buffer_size``, and ``backend`` are ignored and accepted only for backwards compatibility. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. Args: @@ -118,6 +119,7 @@ def save( Because of the reliance on Torchcodec, the parameters ``format``, ``encoding``, ``bits_per_sample``, ``buffer_size``, and ``backend``, are ignored and accepted only for backwards compatibility. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. Args: uri (path-like object): diff --git a/src/torchaudio/_torchcodec.py b/src/torchaudio/_torchcodec.py index ef9ab007a3..a785fe50ad 100644 --- a/src/torchaudio/_torchcodec.py +++ b/src/torchaudio/_torchcodec.py @@ -30,6 +30,7 @@ def load_with_torchcodec( :func:`~torchaudio.load_with_torchcodec`. Note that some parameters of :func:`~torchaudio.load`, like ``normalize``, ``buffer_size``, and ``backend``, are ignored by :func:`~torchaudio.load_with_torchcodec`. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. Args: @@ -180,6 +181,7 @@ def save_with_torchcodec( :func:`~torchaudio.save`, like ``format``, ``encoding``, ``bits_per_sample``, ``buffer_size``, and ``backend``, are ignored by are ignored by :func:`~torchaudio.save_with_torchcodec`. + To install torchcodec, follow the instructions at https://github.com/pytorch/torchcodec#installing-torchcodec. This function provides a TorchCodec-based alternative to torchaudio.save with the same API. TorchCodec's AudioEncoder provides efficient encoding