lezgiantts / app.py
Inial's picture
Create app.py
95908f1 verified
raw
history blame contribute delete
442 Bytes
import gradio as gr
import os
import subprocess
# Chạy cài espeak-ng nếu chưa có
subprocess.run("apt update && apt install -y espeak-ng", shell=True)
def tts_lezgian(text):
os.system(f'espeak-ng -v lez "{text}" -w output.wav')
return "output.wav"
gr.Interface(fn=tts_lezgian,
inputs=gr.Textbox(label="Nhập văn bản tiếng Lezgian"),
outputs=gr.Audio(label="Giọng đọc Lezgian")).launch()