keithito/lj_speech
Updated • 1.51k • 62
How to use sru17/Text_to_Speech with Fairseq:
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
"sru17/Text_to_Speech"
)from gtts import gTTS from IPython.display import Audio from io import BytesIO
text = input("Enter the text you want to convert to speech: ")
tts = gTTS(text) audio_bytes = BytesIO() tts.write_to_fp(audio_bytes)
from IPython.display import Audio
audio_path = '/content/welcome.mp3'
Audio(audio_path)
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub models, cfg, task = load_model_ensemble_and_task_from_hf_hub( "sru17/Text_to_Speech" )