Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ model0 = pipeline(task="automatic-speech-recognition",
|
|
10 |
|
11 |
|
12 |
model_name = "SLPL/Sharif-wav2vec2"
|
13 |
-
|
14 |
model=model_name)
|
15 |
model_name = "ghofrani/common8"
|
16 |
model1 = pipeline(task="automatic-speech-recognition",
|
@@ -19,7 +19,7 @@ model1 = pipeline(task="automatic-speech-recognition",
|
|
19 |
import json
|
20 |
def predict_fa(speech,model):
|
21 |
if model== "SLPL/Sharif-wav2vec2":
|
22 |
-
text =
|
23 |
elif model== "ghofrani/common8":
|
24 |
text = model1(speech,return_timestamps="word" )
|
25 |
elif model== "voidful/wav2vec2-xlsr-multilingual-56":
|
|
|
10 |
|
11 |
|
12 |
model_name = "SLPL/Sharif-wav2vec2"
|
13 |
+
model2 = pipeline(task="automatic-speech-recognition",
|
14 |
model=model_name)
|
15 |
model_name = "ghofrani/common8"
|
16 |
model1 = pipeline(task="automatic-speech-recognition",
|
|
|
19 |
import json
|
20 |
def predict_fa(speech,model):
|
21 |
if model== "SLPL/Sharif-wav2vec2":
|
22 |
+
text = model2(speech,return_timestamps="word" )
|
23 |
elif model== "ghofrani/common8":
|
24 |
text = model1(speech,return_timestamps="word" )
|
25 |
elif model== "voidful/wav2vec2-xlsr-multilingual-56":
|