Commit 73b29fc9 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Redirect build instruction to official doc (#3053)

Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/3053

Reviewed By: nateanl

Differential Revision: D43238766

Pulled By: mthrok

fbshipit-source-id: 4f82878b1c97b0e6a35af75855849b86200e6061
parent 8c5c9a9b
......@@ -26,76 +26,10 @@ to use and feel like a natural extension.
- Compliance interfaces: Run code using PyTorch that align with other libraries
- [Kaldi: spectrogram, fbank, mfcc](https://pytorch.org/audio/main/compliance.kaldi.html)
Dependencies
------------
* PyTorch (See below for the compatible versions)
* [optional] vesis84/kaldi-io-for-python commit cb46cb1f44318a5d04d4941cf39084c5b021241e or above
The following are the corresponding ``torchaudio`` versions and supported Python versions.
| | ``torch`` | ``torchaudio`` | ``python`` |
| ----------- | ------------------------ | ------------------------ | ------------------------------- |
| Development | ``master`` / ``nightly`` | ``main`` / ``nightly`` | ``>=3.8``, ``<=3.10`` |
| Latest versioned release | ``1.13.1`` | ``0.13.1`` | ``>=3.7``, ``<=3.10`` |
<details><summary>Previous versions</summary>
| ``torch`` | ``torchaudio`` | ``python`` |
| ------------------------ | ------------------------ | ------------------------------- |
| ``1.13.0`` | ``0.13.0`` | ``>=3.7``, ``<=3.10`` |
| ``1.12.1`` | ``0.12.1`` | ``>=3.7``, ``<=3.10`` |
| ``1.12.0`` | ``0.12.0`` | ``>=3.7``, ``<=3.10`` |
| ``1.11.0`` | ``0.11.0`` | ``>=3.7``, ``<=3.9`` |
| ``1.10.0`` | ``0.10.0`` | ``>=3.6``, ``<=3.9`` |
| ``1.9.1`` | ``0.9.1`` | ``>=3.6``, ``<=3.9`` |
| ``1.9.0`` | ``0.9.0`` | ``>=3.6``, ``<=3.9`` |
| ``1.8.1`` | ``0.8.1`` | ``>=3.6``, ``<=3.9`` |
| ``1.8.0`` | ``0.8.0`` | ``>=3.6``, ``<=3.9`` |
| ``1.7.1`` | ``0.7.2`` | ``>=3.6``, ``<=3.9`` |
| ``1.7.0`` | ``0.7.0`` | ``>=3.6``, ``<=3.8`` |
| ``1.6.0`` | ``0.6.0`` | ``>=3.6``, ``<=3.8`` |
| ``1.5.0`` | ``0.5.0`` | ``>=3.5``, ``<=3.8`` |
| ``1.4.0`` | ``0.4.0`` | ``==2.7``, ``>=3.5``, ``<=3.8`` |
</details>
Installation
------------
### Binary Distributions
`torchaudio` has binary distributions for PyPI (`pip`) and Anaconda (`conda`).
Please refer to https://pytorch.org/get-started/locally/ for the details.
**Note** Starting `0.10`, torchaudio has CPU-only and CUDA-enabled binary distributions, each of which requires a matching PyTorch version.
**Note** This software was compiled against an unmodified copy of FFmpeg (licensed under [the LGPLv2.1](https://github.com/FFmpeg/FFmpeg/blob/a5d2008e2a2360d351798e9abe883d603e231442/COPYING.LGPLv2.1)), with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded [here](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.1.8).
### From Source
On non-Windows platforms, the build process builds libsox and codecs that torchaudio need to link to. It will fetch and build libmad, lame, flac, vorbis, opus, and libsox before building extension. This process requires `cmake` and `pkg-config`. libsox-based features can be disabled with `BUILD_SOX=0`.
The build process also builds the RNN transducer loss and CTC beam search decoder. These functionalities can be disabled by setting the environment variable `BUILD_RNNT=0` and `BUILD_CTC_DECODER=0`, respectively.
```bash
# Linux
python setup.py install
# OSX
CC=clang CXX=clang++ python setup.py install
# Windows
# We need to use the MSVC x64 toolset for compilation, with Visual Studio's vcvarsall.bat or directly with vcvars64.bat.
# These batch files are under Visual Studio's installation folder, under 'VC\Auxiliary\Build\'.
# More information available at:
# https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line?view=msvc-160#use-vcvarsallbat-to-set-a-64-bit-hosted-build-architecture
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 && set BUILD_SOX=0 && python setup.py install
# or
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" && set BUILD_SOX=0 && python setup.py install
```
This is known to work on linux and unix distributions such as Ubuntu and CentOS 7 and macOS.
If you try this on a new system and find a solution to make it work, feel free to share it by opening an issue.
Please refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio.
Quick Usage
-----------
......
......@@ -59,6 +59,11 @@ The following combination is known to work.
2. Activate dev tools by running the following command.
We need to use the MSVC x64 toolset for compilation.
To enable the toolset, one can use ``vcvarsall.bat`` or ``vcvars64.bat`` file, which
are found under Visual Studio's installation folder, under ``VC\Auxiliary\Build\``.
More information are available at https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line?view=msvc-160#use-vcvarsallbat-to-set-a-64-bit-hosted-build-architecture
.. code-block::
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
......
......@@ -18,15 +18,48 @@ Please refer to https://pytorch.org/get-started/locally/ for the details.
.. note::
This software was compiled against an unmodified copy of FFmpeg (licensed under `the LGPLv2.1 <https://github.com/FFmpeg/FFmpeg/blob/a5d2008e2a2360d351798e9abe883d603e231442/COPYING.LGPLv2.1>`_), with the specific rpath removed so as to enable the use of system libraries. The LGPL source can be downloaded `here <https://github.com/FFmpeg/FFmpeg/releases/tag/n4.1.8>`_.
Dependencies
------------
* `PyTorch <https://pytorch.org>`_
Please refer to the compatibility matrix bellow for supported PyTorch versions.
Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~
* `sentencepiece <https://pypi.org/project/sentencepiece/>`_
Required for performing automatic speech recognition with :ref:`Emformer RNN-T<RNNT>`.
* `deep-phonemizer <https://pypi.org/project/deep-phonemizer/>`_
Required for performing text-to-speech with :ref:`Tacotron2`.
* `kaldi_io <https://pypi.org/project/kaldi-io/>`_
Required to use :py:mod:`torchaudio.kaldi_io` module.
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.
.. list-table::
:header-rows: 1
* - ``torch``
- ``torchaudio``
- ``python``
* - ``PyTorch``
- ``TorchAudio``
- ``Python``
* - ``1.13.1``
- ``0.13.1``
- ``>=3.7``, ``<=3.10``
* - ``1.13.0``
- ``0.13.0``
- ``>=3.7``, ``<=3.10``
......
......@@ -21,6 +21,8 @@ A pre-trained model and associated pipelines are expressed as an instance of ``B
Under the hood, the implementations of ``Bundle`` use components from other ``torchaudio`` modules, such as :mod:`torchaudio.models` and :mod:`torchaudio.transforms`, or even third party libraries like `SentencPiece <https://github.com/google/sentencepiece>`__ and `DeepPhonemizer <https://github.com/as-ideas/DeepPhonemizer>`__. But this implementation detail is abstracted away from library users.
.. _RNNT:
RNN-T Streaming/Non-Streaming ASR
---------------------------------
......@@ -141,6 +143,8 @@ Pretrained Models
HUBERT_ASR_XLARGE
.. _Tacotron2:
Tacotron2 Text-To-Speech
------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment