Update speechbrain.pretrained to speechbrain.inference
Browse filesThe new speechbrain v1.0.0 caused a breaking change which the proposed change aims to fix.
The `"pretrained"` module no longer exists. Instead, it is replaced by the `"inference"` method. Link to the issue: https://github.com/speechbrain/speechbrain/issues/2472
The second change removes the first slash character in the source parameter on line 40 to ensure Tacotron2 fetches from the online repo instead of locally.
README.md
CHANGED
@@ -33,11 +33,11 @@ pip install speechbrain
|
|
33 |
|
34 |
```
|
35 |
import torchaudio
|
36 |
-
from speechbrain.
|
37 |
-
from speechbrain.
|
38 |
|
39 |
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
|
40 |
-
tacotron2 = Tacotron2.from_hparams(source="
|
41 |
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-ljspeech", savedir="tmpdir_vocoder")
|
42 |
|
43 |
# Running the TTS
|
|
|
33 |
|
34 |
```
|
35 |
import torchaudio
|
36 |
+
from speechbrain.inference import Tacotron2
|
37 |
+
from speechbrain.inference import HIFIGAN
|
38 |
|
39 |
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
|
40 |
+
tacotron2 = Tacotron2.from_hparams(source="Sunbird/sunbird-lug-tts", savedir="tmpdir_tts")
|
41 |
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-ljspeech", savedir="tmpdir_vocoder")
|
42 |
|
43 |
# Running the TTS
|