speechbrainteam
commited on
Commit
•
4188503
1
Parent(s):
2f0fba0
Update README.md
Browse files
README.md
CHANGED
@@ -39,7 +39,7 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
39 |
```python
|
40 |
import torch
|
41 |
from speechbrain.inference.vocoders import HIFIGAN
|
42 |
-
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="
|
43 |
mel_specs = torch.rand(2, 80,298)
|
44 |
|
45 |
# Running Vocoder (spectrogram-to-waveform)
|
@@ -54,7 +54,7 @@ from speechbrain.inference.vocoders import HIFIGAN
|
|
54 |
from speechbrain.lobes.models.FastSpeech2 import mel_spectogram
|
55 |
|
56 |
# Load a pretrained HIFIGAN Vocoder
|
57 |
-
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="
|
58 |
|
59 |
# Load an audio file (an example file can be found in this repository)
|
60 |
# Ensure that the audio signal is sampled at 22050 Hz; refer to the provided link for a 16000 Hz Vocoder.
|
@@ -103,8 +103,8 @@ from speechbrain.inference.TTS import Tacotron2
|
|
103 |
from speechbrain.inference.vocoders import HIFIGAN
|
104 |
|
105 |
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
|
106 |
-
tacotron2 = Tacotron2.from_hparams(source="speechbrain/tts-tacotron2-ljspeech", savedir="
|
107 |
-
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="
|
108 |
|
109 |
# Running the TTS
|
110 |
mel_output, mel_length, alignment = tacotron2.encode_text("Mary had a little lamb")
|
|
|
39 |
```python
|
40 |
import torch
|
41 |
from speechbrain.inference.vocoders import HIFIGAN
|
42 |
+
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="pretrained_models/tts-hifigan-libritts-22050Hz")
|
43 |
mel_specs = torch.rand(2, 80,298)
|
44 |
|
45 |
# Running Vocoder (spectrogram-to-waveform)
|
|
|
54 |
from speechbrain.lobes.models.FastSpeech2 import mel_spectogram
|
55 |
|
56 |
# Load a pretrained HIFIGAN Vocoder
|
57 |
+
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="pretrained_models/tts-hifigan-libritts-22050Hz")
|
58 |
|
59 |
# Load an audio file (an example file can be found in this repository)
|
60 |
# Ensure that the audio signal is sampled at 22050 Hz; refer to the provided link for a 16000 Hz Vocoder.
|
|
|
103 |
from speechbrain.inference.vocoders import HIFIGAN
|
104 |
|
105 |
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
|
106 |
+
tacotron2 = Tacotron2.from_hparams(source="speechbrain/tts-tacotron2-ljspeech", savedir="pretrained_models/tts-tacotron2-ljspeech")
|
107 |
+
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-libritts-22050Hz", savedir="pretrained_models/tts-hifigan-libritts-22050Hz")
|
108 |
|
109 |
# Running the TTS
|
110 |
mel_output, mel_length, alignment = tacotron2.encode_text("Mary had a little lamb")
|