Update README.md
Browse files
README.md
CHANGED
@@ -29,11 +29,11 @@ decoder = torch.jit.load(decoder_path)
|
|
29 |
# read the audio
|
30 |
orig_audio_npy, sr = sf.read(path, dtype="int16")
|
31 |
assert sr == 24000
|
32 |
-
orig_audio = torch.tensor(orig_audio_npy).to(device).unsqueeze(0) #
|
33 |
# extract audio tokens from the audio
|
34 |
tokens = encoder(orig_audio) # batch x frames x 4
|
35 |
# synthesize audio from audio tokens
|
36 |
-
resynthesized_audio = decoder(tokens) #
|
37 |
```
|
38 |
|
39 |
See performance of the codec on `vocoder` leaderboard: [TTSLeaderboard](https://huggingface.co/spaces/balacoon/TTSLeaderboard)
|
|
|
29 |
# read the audio
|
30 |
orig_audio_npy, sr = sf.read(path, dtype="int16")
|
31 |
assert sr == 24000
|
32 |
+
orig_audio = torch.tensor(orig_audio_npy).to(device).unsqueeze(0) # batch x samples
|
33 |
# extract audio tokens from the audio
|
34 |
tokens = encoder(orig_audio) # batch x frames x 4
|
35 |
# synthesize audio from audio tokens
|
36 |
+
resynthesized_audio = decoder(tokens) # batch x samples
|
37 |
```
|
38 |
|
39 |
See performance of the codec on `vocoder` leaderboard: [TTSLeaderboard](https://huggingface.co/spaces/balacoon/TTSLeaderboard)
|