Bronsn commited on
Commit
2c01f15
1 Parent(s): 299de35

Update speechbrain.pretrained to speechbrain.inference

Browse files

The 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.

Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -33,11 +33,11 @@ pip install speechbrain
33
 
34
  ```
35
  import torchaudio
36
- from speechbrain.pretrained import Tacotron2
37
- from speechbrain.pretrained 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
 
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