How to run my trained model

#10
by yusufbsahin - opened

Hello
I'm currently training this tacotron2 model with ljspeech dataset on my machine and as of now the training is at epoch 130. So I want to test this model from last checkpoint to see how it goes but I couldn't figure out how to do so. I have tried to modify this code with changing the source to my checkpoint:

"
import torchaudio
from speechbrain.inference.TTS import Tacotron2
from speechbrain.inference.vocoders import HIFIGAN

tacotron2 = Tacotron2.from_hparams(source="speechbrain/tts-tacotron2-ljspeech", savedir="tmpdir_tts")
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-ljspeech", savedir="tmpdir_vocoder")

mel_output, mel_length, alignment = tacotron2.encode_text("Mary had a little lamb")

waveforms = hifi_gan.decode_batch(mel_output)

torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 22050)
"
But it didin't use my model it still used pretrained model from internet. Can anyone help?

Sign up or log in to comment