Spaces:
Sleeping
Sleeping
File size: 483 Bytes
4bbad7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
import subprocess
import uuid
import os
def tts_lezgian(text):
filename = f"{uuid.uuid4()}.wav"
output_path = f"/tmp/{filename}"
command = ["espeak-ng", "-v", "lez", "-w", output_path, text]
subprocess.run(command)
return output_path
gr.Interface(
fn=tts_lezgian,
inputs=gr.Textbox(label="Nhập văn bản tiếng Lezgian"),
outputs=gr.Audio(type="filepath", label="Giọng nói"),
title="TTS Lezgian (eSpeak NG)"
).launch() |