ttslezgian / app.py
ollui's picture
Create app.py
4bbad7c verified
raw
history blame contribute delete
483 Bytes
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()