nairaxo commited on
Commit
7c964eb
1 Parent(s): 9e5e0b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -42,16 +42,16 @@ from speechbrain.pretrained import HIFIGAN
42
 
43
  # Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
44
  tacotron2 = Tacotron2.from_hparams(source="aioxlabs/tacotron-swahili", savedir="tmpdir_tts")
45
- hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-ljspeech", savedir="tmpdir_vocoder")
46
 
47
  # Running the TTS
48
- mel_output, mel_length, alignment = tacotron2.encode_text("Hakuna matata")
49
 
50
  # Running Vocoder (spectrogram-to-waveform)
51
  waveforms = hifi_gan.decode_batch(mel_output)
52
 
53
  # Save the waverform
54
- torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 22050)
55
  ```
56
 
57
  If you want to generate multiple sentences in one-shot, you can do in this way:
 
42
 
43
  # Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
44
  tacotron2 = Tacotron2.from_hparams(source="aioxlabs/tacotron-swahili", savedir="tmpdir_tts")
45
+ hifi_gan = HIFIGAN.from_hparams(source="aioxlabs/hifigan-swahili", savedir="tmpdir_vocoder")
46
 
47
  # Running the TTS
48
+ mel_output, mel_length, alignment = tacotron2.encode_text("raisi wa jumhuri ya tanzania")
49
 
50
  # Running Vocoder (spectrogram-to-waveform)
51
  waveforms = hifi_gan.decode_batch(mel_output)
52
 
53
  # Save the waverform
54
+ torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 16000)
55
  ```
56
 
57
  If you want to generate multiple sentences in one-shot, you can do in this way: