csukuangfj
commited on
Commit
·
f5633db
1
Parent(s):
ffd4c6b
fix whisper
Browse files
model.py
CHANGED
@@ -71,13 +71,13 @@ def _get_whisper_model(repo_id: str) -> sherpa_onnx.OfflineRecognizer:
|
|
71 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
72 |
encoder = _get_nn_model_filename(
|
73 |
repo_id=full_repo_id,
|
74 |
-
filename=f"{name}-encoder.int8.
|
75 |
subfolder=".",
|
76 |
)
|
77 |
|
78 |
decoder = _get_nn_model_filename(
|
79 |
repo_id=full_repo_id,
|
80 |
-
filename=f"{name}-decoder.int8.
|
81 |
subfolder=".",
|
82 |
)
|
83 |
|
@@ -330,6 +330,9 @@ english_models = {
|
|
330 |
"whisper-tiny.en": _get_whisper_model,
|
331 |
"whisper-base.en": _get_whisper_model,
|
332 |
"whisper-small.en": _get_whisper_model,
|
|
|
|
|
|
|
333 |
"yfyeung/icefall-asr-multidataset-pruned_transducer_stateless7-2023-05-04": _get_english_model, # noqa
|
334 |
}
|
335 |
|
|
|
71 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
72 |
encoder = _get_nn_model_filename(
|
73 |
repo_id=full_repo_id,
|
74 |
+
filename=f"{name}-encoder.int8.onnx",
|
75 |
subfolder=".",
|
76 |
)
|
77 |
|
78 |
decoder = _get_nn_model_filename(
|
79 |
repo_id=full_repo_id,
|
80 |
+
filename=f"{name}-decoder.int8.onnx",
|
81 |
subfolder=".",
|
82 |
)
|
83 |
|
|
|
330 |
"whisper-tiny.en": _get_whisper_model,
|
331 |
"whisper-base.en": _get_whisper_model,
|
332 |
"whisper-small.en": _get_whisper_model,
|
333 |
+
"whisper-distil-small.en": _get_whisper_model,
|
334 |
+
"whisper-medium.en": _get_whisper_model,
|
335 |
+
"whisper-distil-medium.en": _get_whisper_model,
|
336 |
"yfyeung/icefall-asr-multidataset-pruned_transducer_stateless7-2023-05-04": _get_english_model, # noqa
|
337 |
}
|
338 |
|