Spaces:
Runtime error
Runtime error
File size: 631 Bytes
c7e9d11 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from orator.src.orator.tts import OratorTTS
import gradio as gr
model = OratorTTS.from_pretrained("cuda")
def generate(text, audio_prompt_path, emotion_adv):
wav = model.generate(text, audio_prompt_path=audio_prompt_path, emotion_adv=emotion_adv)
return 24000, wav.squeeze(0).numpy()
demo = gr.Interface(
generate,
[
gr.Textbox(value="What does the fox say?", label="Text to synthesize"),
gr.Audio(sources="upload", type="filepath", label="Input Audio File"),
gr.Slider(0, 1, step=.05, label="emotion_adv", value=.5),
],
"audio",
)
if __name__ == "__main__":
demo.launch()
|