Commit 1638efee authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Update README.md (#3567)

Summary:
Remove mention of backend and quick usage. Those are explained in the documentation in detail.

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

Reviewed By: huangruizhe

Differential Revision: D48471832

Pulled By: mthrok

fbshipit-source-id: 467efc1f11f66534c33cf4751de27b08176c31bf
parent 126f9f6c
......@@ -32,35 +32,6 @@ Installation
Please refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio.
Quick Usage
-----------
```python
import torchaudio
waveform, sample_rate = torchaudio.load('foo.wav') # load tensor from file
torchaudio.save('foo_save.wav', waveform, sample_rate) # save tensor to file
```
Backend Dispatch
----------------
By default in OSX and Linux, torchaudio uses SoX as a backend to load and save files.
The backend can be changed to [SoundFile](https://pysoundfile.readthedocs.io/en/latest/)
using the following. See [SoundFile](https://pysoundfile.readthedocs.io/en/latest/)
for installation instructions.
```python
import torchaudio
torchaudio.set_audio_backend("soundfile") # switch backend
waveform, sample_rate = torchaudio.load('foo.wav') # load tensor from file, as usual
torchaudio.save('foo_save.wav', waveform, sample_rate) # save tensor to file, as usual
```
**Note**
- SoundFile currently does not support mp3.
- "soundfile" backend is not supported by TorchScript.
API Reference
-------------
......
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