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.
#### Troubleshooting
<Details><Summary>checking build system type... ./config.guess: unable to guess system type</Summary>
Since the configuration file for codecs are old, they cannot correctly detect the new environments, such as Jetson Aarch. You need to replace the `config.guess` file in `./third_party/tmp/lame-3.99.5/config.guess` and/or `./third_party/tmp/libmad-0.15.1b/config.guess` with [the latest one](https://github.com/gcc-mirror/gcc/blob/master/config.guess).
See also: [#658](https://github.com/pytorch/audio/issues/658)
</Details>
<Details><Summary>Undefined reference to `tgetnum' when using `BUILD_SOX`</Summary>
If while building from within an anaconda environment you come across errors similar to the following:
```
../bin/ld: console.c:(.text+0xc1): undefined reference to `tgetnum'
```
Install `ncurses` from `conda-forge` before running `python setup.py install`:
```
# Install ncurses from conda-forge
conda install -c conda-forge ncurses
```
</Details>
Quick Usage
-----------
...
...
@@ -160,7 +130,9 @@ waveform, sample_rate = torchaudio.load('foo.wav') # load tensor from file, as
torchaudio.save('foo_save.wav',waveform,sample_rate)# save tensor to file, as usual
```
Unlike SoX, SoundFile does not currently support mp3.
**Note**
- SoundFile currently does not support mp3.
- "soundfile" backend is not supported by TorchScript.
API Reference
-------------
...
...
@@ -204,7 +176,7 @@ Transforms expect and return the following dimensions.
*`Fade`: (channel, time) -> (channel, time)
*`Vol`: (channel, time) -> (channel, time)
Complex numbers are supported via tensors of dimension (..., 2), and torchaudio provides `complex_norm` and `angle` to convert such a tensor into its magnitude and phase. Here, and in the documentation, we use an ellipsis "..." as a placeholder for the rest of the dimensions of a tensor, e.g. optional batching and channel dimensions.
Here, and in the documentation, we use an ellipsis "..." as a placeholder for the rest of the dimensions of a tensor, e.g. optional batching and channel dimensions.