karim23657
commited on
Commit
•
a2635d5
1
Parent(s):
b0d58fd
Update app.py
Browse files
app.py
CHANGED
@@ -185,17 +185,17 @@ html_seeker2=''';
|
|
185 |
update();
|
186 |
</script>'''
|
187 |
|
188 |
-
model_name = "voidful/wav2vec2-xlsr-multilingual-56"
|
189 |
-
model0 = pipeline(task="automatic-speech-recognition",
|
190 |
-
|
191 |
|
192 |
|
193 |
-
model_name = "SLPL/Sharif-wav2vec2"
|
194 |
-
model2 = pipeline(task="automatic-speech-recognition",
|
195 |
-
|
196 |
-
model_name = "ghofrani/common8"
|
197 |
-
model1 = pipeline(task="automatic-speech-recognition",
|
198 |
-
|
199 |
|
200 |
import json
|
201 |
def predict_fa(speech,model):
|
@@ -241,13 +241,13 @@ def g_rec(audio_File ,language):
|
|
241 |
with gr.Blocks() as demo:
|
242 |
gr.Markdown("multilingual Speech Recognition")
|
243 |
|
244 |
-
with gr.Tab("Persian models"):
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
with gr.Tab("google"):
|
252 |
gr.Markdown("set your speech language")
|
253 |
inputs_speech1 =[
|
|
|
185 |
update();
|
186 |
</script>'''
|
187 |
|
188 |
+
# model_name = "voidful/wav2vec2-xlsr-multilingual-56"
|
189 |
+
# model0 = pipeline(task="automatic-speech-recognition",
|
190 |
+
# model=model_name)
|
191 |
|
192 |
|
193 |
+
# model_name = "SLPL/Sharif-wav2vec2"
|
194 |
+
# model2 = pipeline(task="automatic-speech-recognition",
|
195 |
+
# model=model_name)
|
196 |
+
# model_name = "ghofrani/common8"
|
197 |
+
# model1 = pipeline(task="automatic-speech-recognition",
|
198 |
+
# model=model_name)
|
199 |
|
200 |
import json
|
201 |
def predict_fa(speech,model):
|
|
|
241 |
with gr.Blocks() as demo:
|
242 |
gr.Markdown("multilingual Speech Recognition")
|
243 |
|
244 |
+
# with gr.Tab("Persian models"):
|
245 |
+
# inputs_speech_fa =gr.Audio(source="upload", type="filepath", optional=True,label="Upload your audio:")
|
246 |
+
# inputs_model_fa =gr.inputs.Radio(label="Language", choices=["ghofrani/common8","SLPL/Sharif-wav2vec2","voidful/wav2vec2-xlsr-multilingual-56"])
|
247 |
+
# output_transcribe1_fa = gr.Textbox(label="Transcribed text:")
|
248 |
+
# output_transcribe1_fa1 = gr.Textbox(label="Transcribed text with timestamps:")
|
249 |
+
# output_transcribe1_fa2 =gr.HTML(label="")
|
250 |
+
# transcribe_audio1_fa= gr.Button("Submit")
|
251 |
with gr.Tab("google"):
|
252 |
gr.Markdown("set your speech language")
|
253 |
inputs_speech1 =[
|