thettsofbashkir / app.py
Inial's picture
Create app.py
8ebfbef verified
raw
history blame contribute delete
536 Bytes
import gradio as gr
import os
def bashkir_tts(text):
os.system("apt-get update && apt-get install -y espeak-ng") # Cài espeak-ng khi Spaces khởi động
os.system(f'espeak-ng -v ba "{text}" -w output.wav') # Tạo file âm thanh từ văn bản
return "output.wav"
iface = gr.Interface(
fn=bashkir_tts,
inputs=gr.Textbox(label="Nhập văn bản tiếng Bashkir"),
outputs=gr.Audio(label="Giọng nói"),
title="Bashkir TTS",
description="TTS đơn giản dùng espeak-ng"
)
iface.launch()