mkfallah commited on
Commit
98b2436
·
verified ·
1 Parent(s): 153e956

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
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 set device=0
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; recognized words are corrected
 
 
 
 
 
 
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()