ollui commited on
Commit
4bbad7c
verified
1 Parent(s): f45007d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import subprocess
3
+ import uuid
4
+ import os
5
+
6
+ def tts_lezgian(text):
7
+ filename = f"{uuid.uuid4()}.wav"
8
+ output_path = f"/tmp/{filename}"
9
+ command = ["espeak-ng", "-v", "lez", "-w", output_path, text]
10
+ subprocess.run(command)
11
+ return output_path
12
+
13
+ gr.Interface(
14
+ fn=tts_lezgian,
15
+ inputs=gr.Textbox(label="Nh岷璸 v膬n b岷 ti岷縩g Lezgian"),
16
+ outputs=gr.Audio(type="filepath", label="Gi峄峮g n贸i"),
17
+ title="TTS Lezgian (eSpeak NG)"
18
+ ).launch()