File size: 531 Bytes
eeecc4a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import gradio as gr
from transformers import pipeline
# মডেল লোড করা হচ্ছে
pipe = pipeline("text-to-speech", model=".")
def predict(text):
audio = pipe(text)
return audio["audio"]
# ইন্টারফেস তৈরি
demo = gr.Interface(
fn=predict,
inputs=gr.Textbox(label="আপনার স্ক্রিপ্ট লিখুন"),
outputs=gr.Audio(label="জেনারেটেড ভয়েস"),
title="Ghost AI Voice Hub"
)
demo.launch() |