Spaces:
Runtime error
Runtime error
File size: 566 Bytes
1785140 1945c48 1785140 1945c48 1785140 1945c48 1785140 1945c48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import spaces
import gradio as gr
import torch
from TTS.api import TTS
import os
os.environ["COQUI_TOS_AGREED"] = "1"
device = "cuda"
tts = TTS("tts_models/multilingual/multi-dataset/xtts_bill_spa").to(device)
def generateVoice(prompt):
outputs = model.synthesize(
"Hola amigos, bienvenidos a mi canal",
config,
speaker_wav="/guide_recording/guide.wav",
gpt_cond_len=3,
language="es",
)
return outputs
demo = gr.Interface(
fn=generateVoice,
inputs=["text"],
outputs=["audio"],
)
demo.launch() |