Spaces:
Runtime error
Runtime error
File size: 477 Bytes
5366d8e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from transformers import pipeline
# Load the model directly from Hugging Face Hub
tts_pipeline = pipeline("text-to-speech", model="Abhinay45/XTTS-Hindi-finetuned")
def text_to_speech(text):
speech = tts_pipeline(text)
return speech['audio']
# Create a Gradio interface
iface = gr.Interface(fn=text_to_speech,
inputs="text",
outputs="audio",
title="Text to Speech")
iface.launch()
|