tts-hindi-v1.1 / app.py
vinayaggarwal5050's picture
create app.py
5366d8e verified
raw
history blame contribute delete
477 Bytes
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()