Spaces:
Configuration error
Configuration error
Ctrl+K
Rename README.md to import gradio as gr import torchaudio from speechbrain.pretrained import Tacotron2, HIFIGAN tacotron = Tacotron2.from_hparams("Sunbird/tts-tacotron2-lug", savedir="/data/tts") vocoder = HIFIGAN.from_hparams("speechbrain/tts-hifigan-ljspeech", savedir="/data/voc") def speak(text): mel, _, _ = tacotron.encode_text(text) wav = vocoder.decode_batch(mel) torchaudio.save("out.wav", wav.squeeze(1).cpu(), 22050) return "out.wav" gr.Interface( fn=speak, inputs=gr.Textbox(value="Biitidulopu ye namba wani", label="Luganda"), outputs=gr.Audio(type="filepath"), title="BeatDrop Luganda TTS" ).launch()
a8c1a2e verified