Spaces:
Sleeping
Sleeping
| 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() |