Spaces:
Runtime error
Runtime error
Add-Vishnu
commited on
Commit
•
003879a
1
Parent(s):
7788a27
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from asr import transcribe,detect_language,transcribe_lang
|
3 |
+
|
4 |
+
demo = gr.Interface(transcribe,
|
5 |
+
gr.Audio(source="microphone", type="filepath", label="Use mic"),
|
6 |
+
outputs=["text","text"])
|
7 |
+
demo2 = gr.Interface(detect_language,
|
8 |
+
gr.Audio(source="microphone", type="filepath", label="Use mic"),
|
9 |
+
outputs=["text","text"])
|
10 |
+
demo3 = gr.Interface(transcribe_lang,
|
11 |
+
inputs=[gr.Audio(source="microphone", type="filepath", label="Use mic"),"text"],
|
12 |
+
outputs=["text","text"])
|
13 |
+
|
14 |
+
tabbed_interface = gr.TabbedInterface([demo,demo2,demo3],["Transcribe by auto detecting language","Detect language","Transcribe by providing language"])
|
15 |
+
|
16 |
+
with gr.Blocks() as asr:
|
17 |
+
tabbed_interface.render()
|
18 |
+
asr.queue(concurrency_count=3)
|
19 |
+
asr.launch()
|