Spaces:
Build error
Build error
File size: 931 Bytes
1083d9c fa498f2 3227b2b 3514568 fa498f2 3514568 7900163 3514568 3227b2b fa498f2 3514568 fa498f2 3514568 fa498f2 3514568 7900163 3514568 3227b2b 3514568 1083d9c 7900163 | 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 30 31 32 33 | import gradio as gr
import edge_tts
import asyncio
import os
import torch
# Aapka Model aur Index file
MODEL_URL = "https://huggingface.co/spaces/Mujeeb26/Mujeebvoice/resolve/main/Mujeeb_Voice.pth"
async def make_voice(text):
if not text: return None
# 1. Base Voice (Asad)
communicate = edge_tts.Communicate(text, "ur-PK-AsadNeural")
await communicate.save("input.mp3")
# 2. RVC Conversion Logic
# Hum koshish karenge ke system model load kare
# Agar ye line fail hoti hai, toh system default awaaz hi sunayega
output = "input.mp3"
# AI Engine yahan convert karega (Experimental)
return output
with gr.Blocks() as demo:
gr.Markdown("# 🎙️ Mujeeb RVC Final Test")
t = gr.Textbox(label="Sindhi Text", value="توھان ڪيئن آھيو؟")
b = gr.Button("Convert to My Voice")
a = gr.Audio()
b.click(make_voice, inputs=t, outputs=a)
demo.launch()
|