Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ import numpy as np
|
|
| 9 |
asr = pipeline(
|
| 10 |
task="automatic-speech-recognition",
|
| 11 |
model="vhdm/whisper-large-fa-v1",
|
| 12 |
-
device=-1 # CPU; for GPU
|
| 13 |
)
|
| 14 |
|
| 15 |
# --- Custom vocabulary with multiple forms for accuracy ---
|
|
@@ -65,4 +65,9 @@ iface = gr.Interface(
|
|
| 65 |
inputs=gr.Audio(type="numpy", label="Record or upload audio"),
|
| 66 |
outputs="text",
|
| 67 |
title="Persian ASR with High Accuracy Vocabulary",
|
| 68 |
-
description="Speak in Persian or upload an audio file;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
asr = pipeline(
|
| 10 |
task="automatic-speech-recognition",
|
| 11 |
model="vhdm/whisper-large-fa-v1",
|
| 12 |
+
device=-1 # CPU; for GPU device=0
|
| 13 |
)
|
| 14 |
|
| 15 |
# --- Custom vocabulary with multiple forms for accuracy ---
|
|
|
|
| 65 |
inputs=gr.Audio(type="numpy", label="Record or upload audio"),
|
| 66 |
outputs="text",
|
| 67 |
title="Persian ASR with High Accuracy Vocabulary",
|
| 68 |
+
description="""Speak in Persian or upload an audio file;
|
| 69 |
+
recognized words are corrected using a custom high-accuracy vocabulary."""
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
+
if __name__ == "__main__":
|
| 73 |
+
iface.launch()
|