csukuangfj
commited on
Commit
•
8fef7e7
1
Parent(s):
6281348
fix whisper
Browse files
model.py
CHANGED
@@ -105,12 +105,12 @@ def get_pretrained_model(name: str) -> sherpa_onnx.OfflineRecognizer:
|
|
105 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
106 |
encoder = _get_nn_model_filename(
|
107 |
repo_id=full_repo_id,
|
108 |
-
filename=f"{name}-encoder.int8.
|
109 |
)
|
110 |
|
111 |
decoder = _get_nn_model_filename(
|
112 |
repo_id=full_repo_id,
|
113 |
-
filename=f"{name}-decoder.int8.
|
114 |
)
|
115 |
|
116 |
tokens = _get_token_filename(repo_id=full_repo_id, filename=f"{name}-tokens.txt")
|
@@ -130,8 +130,10 @@ whisper_models = {
|
|
130 |
"base.en": get_pretrained_model,
|
131 |
"small.en": get_pretrained_model,
|
132 |
"medium.en": get_pretrained_model,
|
|
|
133 |
"tiny": get_pretrained_model,
|
134 |
"base": get_pretrained_model,
|
135 |
"small": get_pretrained_model,
|
|
|
136 |
"medium": get_pretrained_model,
|
137 |
}
|
|
|
105 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
106 |
encoder = _get_nn_model_filename(
|
107 |
repo_id=full_repo_id,
|
108 |
+
filename=f"{name}-encoder.int8.onnx",
|
109 |
)
|
110 |
|
111 |
decoder = _get_nn_model_filename(
|
112 |
repo_id=full_repo_id,
|
113 |
+
filename=f"{name}-decoder.int8.onnx",
|
114 |
)
|
115 |
|
116 |
tokens = _get_token_filename(repo_id=full_repo_id, filename=f"{name}-tokens.txt")
|
|
|
130 |
"base.en": get_pretrained_model,
|
131 |
"small.en": get_pretrained_model,
|
132 |
"medium.en": get_pretrained_model,
|
133 |
+
"distil-medium.en": get_pretrained_model,
|
134 |
"tiny": get_pretrained_model,
|
135 |
"base": get_pretrained_model,
|
136 |
"small": get_pretrained_model,
|
137 |
+
"distil-small.en": get_pretrained_model,
|
138 |
"medium": get_pretrained_model,
|
139 |
}
|