Update README.md
Browse files
README.md
CHANGED
@@ -28,31 +28,6 @@ pip install vocos[train]
|
|
28 |
|
29 |
## Usage
|
30 |
|
31 |
-
### Reconstruct audio from mel-spectrogram
|
32 |
-
|
33 |
-
```python
|
34 |
-
import torch
|
35 |
-
|
36 |
-
from vocos import Vocos
|
37 |
-
|
38 |
-
vocos = Vocos.from_pretrained("charactr/vocos-mel-24khz")
|
39 |
-
|
40 |
-
mel = torch.randn(1, 100, 256) # B, C, T
|
41 |
-
audio = vocos.decode(mel)
|
42 |
-
```
|
43 |
-
|
44 |
-
Copy-synthesis from a file:
|
45 |
-
|
46 |
-
```python
|
47 |
-
import torchaudio
|
48 |
-
|
49 |
-
y, sr = torchaudio.load(YOUR_AUDIO_FILE)
|
50 |
-
if y.size(0) > 1: # mix to mono
|
51 |
-
y = y.mean(dim=0, keepdim=True)
|
52 |
-
y = torchaudio.functional.resample(y, orig_freq=sr, new_freq=24000)
|
53 |
-
y_hat = vocos(y)
|
54 |
-
```
|
55 |
-
|
56 |
### Reconstruct audio from EnCodec tokens
|
57 |
|
58 |
Additionally, you need to provide a `bandwidth_id` which corresponds to the embedding for bandwidth from the
|
|
|
28 |
|
29 |
## Usage
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
### Reconstruct audio from EnCodec tokens
|
32 |
|
33 |
Additionally, you need to provide a `bandwidth_id` which corresponds to the embedding for bandwidth from the
|