You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/backend.rst
+3-112Lines changed: 3 additions & 112 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,44 +11,18 @@ Overview
11
11
There are currently four implementations available.
12
12
13
13
* :ref:`"sox_io" <sox_io_backend>` (default on Linux/macOS)
14
-
* :ref:`"sox" <sox_backend>` (deprecated, will be removed in 0.9.0 release)
15
14
* :ref:`"soundfile" <soundfile_backend>` (default on Windows)
16
-
* :ref:`"soundfile" (legacy interface) <soundfile_legacy_backend>` (deprecated, will be removed in 0.9.0 release)
17
-
18
-
The use of ``"sox"`` backend is strongly discouraged as it cannot correctly handle formats other than 16-bit integer WAV. See `#726 <https://github.com/pytorch/audio/pull/726>`_ for the detail.
19
15
20
16
.. note::
21
17
Instead of calling functions in ``torchaudio.backend`` directly, please use ``torchaudio.info``, ``torchaudio.load``, ``torchaudio.load_wav`` and ``torchaudio.save`` with proper backend set with :func:`torchaudio.set_audio_backend`.
22
18
23
19
Availability
24
20
------------
25
21
26
-
``"sox"`` and ``"sox_io"`` backends require C++ extension module, which is included in Linux/macOS binary distributions. These backends are not available on Windows.
22
+
``"sox_io"`` backend requires C++ extension module, which is included in Linux/macOS binary distributions. This backend is not available on Windows.
27
23
28
24
``"soundfile"`` backend requires ``SoundFile``. Please refer to `the SoundFile documentation <https://pysoundfile.readthedocs.io/en/latest/>`_ for the installation.
29
25
30
-
Changes in default backend and deprecation
31
-
------------------------------------------
32
-
33
-
Backend module is going through a major overhaul. The following table summarizes the timeline for the deprecations and removals.
@@ -153,55 +79,20 @@ You can switch from another backend to the ``"soundfile"`` backend with the foll
153
79
154
80
torchaudio.set_audio_backend("soundfile")
155
81
156
-
.. note::
157
-
If you are switching from `"soundfile" (legacy interface) <soundfile_legacy_backend>` backend, set ``torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE`` flag **before** switching the backend.
``"soundfile"`` backend with legacy interface is made available for backward compatibility reason, however this interface is deprecated and will be removed in the ``0.9.0`` release.
183
-
184
-
To switch to this backend/interface, set ``torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE`` flag **before** switching the backend.
185
-
186
-
.. code::
187
-
188
-
torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE = True
189
-
torchaudio.set_audio_backend("soundfile") # The legacy interface
0 commit comments