Spaces:
Sleeping
Sleeping
Vineel Pratap
commited on
Commit
·
d15da79
1
Parent(s):
daad6da
fix ex
Browse files- app.py +12 -8
- upload/english/english.mp3 +0 -0
- upload/english/english_full.mp3 +0 -0
- zeroshot.py +1 -0
app.py
CHANGED
@@ -84,6 +84,9 @@ with gr.Blocks(css="style.css") as demo:
|
|
84 |
with gr.Accordion("Logs", open=False):
|
85 |
logs = gr.Textbox(show_label=False)
|
86 |
|
|
|
|
|
|
|
87 |
btn.click(
|
88 |
process,
|
89 |
inputs=[
|
@@ -94,6 +97,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
94 |
lmscore,
|
95 |
wscore_usedefault,
|
96 |
lmscore_usedefault,
|
|
|
97 |
],
|
98 |
outputs=[text, logs],
|
99 |
)
|
@@ -102,21 +106,21 @@ with gr.Blocks(css="style.css") as demo:
|
|
102 |
gr.Examples(
|
103 |
examples=[
|
104 |
# ["upload/english/english.mp3", "upload/english/c4_25k_sentences.txt"],
|
105 |
-
["upload/english/english.mp3", "upload/english/c4_10k_sentences.txt"],
|
106 |
-
["upload/english/english.mp3", "upload/english/c4_5k_sentences.txt"],
|
107 |
-
["upload/english/english.mp3", "upload/english/cv8_top10k_words.txt"],
|
108 |
],
|
109 |
-
inputs=[audio, words_file],
|
110 |
label="English",
|
111 |
)
|
112 |
gr.Examples(
|
113 |
examples=[
|
114 |
# ["upload/english/english.mp3", "upload/english/c4_25k_sentences.txt"],
|
115 |
-
["upload/ligurian/ligurian_1.mp3", "upload/ligurian/zenamt_10k_sentences.txt"],
|
116 |
-
["upload/ligurian/ligurian_2.mp3", "upload/ligurian/zenamt_10k_sentences.txt"],
|
117 |
-
["upload/ligurian/ligurian_3.mp3", "upload/ligurian/zenamt_5k_sentences.txt"],
|
118 |
],
|
119 |
-
inputs=[audio, words_file],
|
120 |
label="Ligurian",
|
121 |
)
|
122 |
|
|
|
84 |
with gr.Accordion("Logs", open=False):
|
85 |
logs = gr.Textbox(show_label=False)
|
86 |
|
87 |
+
# hack
|
88 |
+
reference = gr.Textbox(label="Reference Transcript", visible=False)
|
89 |
+
|
90 |
btn.click(
|
91 |
process,
|
92 |
inputs=[
|
|
|
97 |
lmscore,
|
98 |
wscore_usedefault,
|
99 |
lmscore_usedefault,
|
100 |
+
reference
|
101 |
],
|
102 |
outputs=[text, logs],
|
103 |
)
|
|
|
106 |
gr.Examples(
|
107 |
examples=[
|
108 |
# ["upload/english/english.mp3", "upload/english/c4_25k_sentences.txt"],
|
109 |
+
["upload/english/english.mp3", "upload/english/c4_10k_sentences.txt", " This is going to look at the code that we have in our configuration that we've already exported and compare it to our database, and we want to import"],
|
110 |
+
["upload/english/english.mp3", "upload/english/c4_5k_sentences.txt", " This is going to look at the code that we have in our configuration that we've already exported and compare it to our database, and we want to import"],
|
111 |
+
["upload/english/english.mp3", "upload/english/cv8_top10k_words.txt", " This is going to look at the code that we have in our configuration that we've already exported and compare it to our database, and we want to import"],
|
112 |
],
|
113 |
+
inputs=[audio, words_file, reference],
|
114 |
label="English",
|
115 |
)
|
116 |
gr.Examples(
|
117 |
examples=[
|
118 |
# ["upload/english/english.mp3", "upload/english/c4_25k_sentences.txt"],
|
119 |
+
["upload/ligurian/ligurian_1.mp3", "upload/ligurian/zenamt_10k_sentences.txt", "I mæ colleghi m’an domandou d’aggiuttâli à fâ unna preuva co-o zeneise pe vedde s’o fonçioña."],
|
120 |
+
["upload/ligurian/ligurian_2.mp3", "upload/ligurian/zenamt_10k_sentences.txt", "Staseia vaggo à çenâ con mæ moggê e doî amixi che de chì à quarche settemaña faian stramuo feua stato."],
|
121 |
+
["upload/ligurian/ligurian_3.mp3", "upload/ligurian/zenamt_5k_sentences.txt", "Pe inandiâ o pesto ghe veu o baxaicò, i pigneu, l’euio, o formaggio, l’aggio e a sâ."],
|
122 |
],
|
123 |
+
inputs=[audio, words_file, reference],
|
124 |
label="Ligurian",
|
125 |
)
|
126 |
|
upload/english/english.mp3
CHANGED
Binary files a/upload/english/english.mp3 and b/upload/english/english.mp3 differ
|
|
upload/english/english_full.mp3
ADDED
Binary file (40.5 kB). View file
|
|
zeroshot.py
CHANGED
@@ -109,6 +109,7 @@ def process(
|
|
109 |
lmscore=None,
|
110 |
wscore_usedefault=True,
|
111 |
lmscore_usedefault=True,
|
|
|
112 |
):
|
113 |
transcription, logs = "", MY_LOG()
|
114 |
if not audio_data or not words_file:
|
|
|
109 |
lmscore=None,
|
110 |
wscore_usedefault=True,
|
111 |
lmscore_usedefault=True,
|
112 |
+
reference=None
|
113 |
):
|
114 |
transcription, logs = "", MY_LOG()
|
115 |
if not audio_data or not words_file:
|