Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,15 +40,23 @@ model_id = "jonatasgrosman/wav2vec2-large-xlsr-53-persian"
|
|
40 |
processor = Wav2Vec2Processor.from_pretrained(model_id)
|
41 |
model = Wav2Vec2ForCTC.from_pretrained(model_id)
|
42 |
|
43 |
-
input_ = gr.Audio(source="microphone",
|
|
|
|
|
|
|
|
|
|
|
44 |
txtbox = gr.Textbox(
|
45 |
-
label="
|
46 |
-
lines=5
|
|
|
|
|
|
|
47 |
)
|
48 |
|
49 |
title = "Speech-to-Text (persian)"
|
50 |
-
description = "
|
51 |
-
article = "<p style='text-align: center'><a href='https://
|
52 |
|
53 |
demo = gr.Interface(fn=parse, inputs = input_, outputs=txtbox, title=title, description=description, article = article,
|
54 |
streaming=True, interactive=True,
|
|
|
40 |
processor = Wav2Vec2Processor.from_pretrained(model_id)
|
41 |
model = Wav2Vec2ForCTC.from_pretrained(model_id)
|
42 |
|
43 |
+
input_ = gr.Audio(source="microphone",
|
44 |
+
type="filepath",
|
45 |
+
label="لطفا دکمه ضبط صدا را بزنید و شروع به صحبت کنید و بعذ از اتمام صحبت دوباره دکمه ضبط را فشار دهید.",
|
46 |
+
show_download_button=True,
|
47 |
+
show_edit_button=True,
|
48 |
+
)
|
49 |
txtbox = gr.Textbox(
|
50 |
+
label="متن گفتار شما: ",
|
51 |
+
lines=5,
|
52 |
+
text_align="right",
|
53 |
+
show_label=True,
|
54 |
+
show_copy_button=True,
|
55 |
)
|
56 |
|
57 |
title = "Speech-to-Text (persian)"
|
58 |
+
description = "، توجه داشته باشد که هرچه گفتار شما شمرده تر باشد خروجی با کیفیت تری دارید.روی دکمه ضبط صدا کلیک کنید و سپس دسترسی مرورگر خود را به میکروفون دستگاه دهید، سپس شروع به صحبت کنید و برای اتمام ضبط دوباره روی دکمه کلیک کنید"
|
59 |
+
article = "<p style='text-align: center'><a href='https://github.com/nimaprgrmr'>Large-Scale Self- and Semi-Supervised Learning for Speech Translation</a></p>"
|
60 |
|
61 |
demo = gr.Interface(fn=parse, inputs = input_, outputs=txtbox, title=title, description=description, article = article,
|
62 |
streaming=True, interactive=True,
|