Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -50,15 +50,11 @@ def recognition(audio, style=0):
|
|
50 |
return txt
|
51 |
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
output = gr.outputs.Textbox(label="Output Text")
|
61 |
-
|
62 |
text = "ASR Transcription Opensource Demo"
|
63 |
|
64 |
# description
|
@@ -73,11 +69,11 @@ description = (
|
|
73 |
|
74 |
interface = gr.Interface(
|
75 |
fn=recognition,
|
76 |
-
inputs=
|
77 |
-
outputs=
|
78 |
title=text,
|
79 |
description=description,
|
80 |
-
theme='
|
81 |
)
|
82 |
|
83 |
interface.launch(enable_queue=True)
|
|
|
50 |
return txt
|
51 |
|
52 |
|
53 |
+
audio_input = gr.Audio(type="filepath", label="Upload or Record Audio")
|
54 |
+
style_slider = gr.Slider(0, 1, value=0, step=0.1, label="Transcription Style",
|
55 |
+
info="Adjust the transcription style: 0 (casual) to 1 (formal).")
|
56 |
+
output_textbox = gr.Textbox(label="Transcription Output")
|
57 |
+
|
|
|
|
|
|
|
|
|
58 |
text = "ASR Transcription Opensource Demo"
|
59 |
|
60 |
# description
|
|
|
69 |
|
70 |
interface = gr.Interface(
|
71 |
fn=recognition,
|
72 |
+
inputs=[audio_input, style_slider],
|
73 |
+
outputs=output_textbox,
|
74 |
title=text,
|
75 |
description=description,
|
76 |
+
theme='default',
|
77 |
)
|
78 |
|
79 |
interface.launch(enable_queue=True)
|