csukuangfj
commited on
Commit
·
78c721b
1
Parent(s):
0a006c7
add medium and large
Browse files
model.py
CHANGED
@@ -92,7 +92,16 @@ def _get_token_filename(
|
|
92 |
|
93 |
@lru_cache(maxsize=8)
|
94 |
def get_pretrained_model(name: str) -> sherpa_onnx.OfflineRecognizer:
|
95 |
-
assert name in (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
97 |
encoder = _get_nn_model_filename(
|
98 |
repo_id=full_repo_id,
|
@@ -123,4 +132,6 @@ whisper_models = {
|
|
123 |
"tiny": get_pretrained_model,
|
124 |
"base": get_pretrained_model,
|
125 |
"small": get_pretrained_model,
|
|
|
|
|
126 |
}
|
|
|
92 |
|
93 |
@lru_cache(maxsize=8)
|
94 |
def get_pretrained_model(name: str) -> sherpa_onnx.OfflineRecognizer:
|
95 |
+
assert name in (
|
96 |
+
"tiny.en",
|
97 |
+
"base.en",
|
98 |
+
"small.en",
|
99 |
+
"tiny",
|
100 |
+
"base",
|
101 |
+
"small",
|
102 |
+
"medium",
|
103 |
+
"large",
|
104 |
+
), name
|
105 |
full_repo_id = "csukuangfj/sherpa-onnx-whisper-" + name
|
106 |
encoder = _get_nn_model_filename(
|
107 |
repo_id=full_repo_id,
|
|
|
132 |
"tiny": get_pretrained_model,
|
133 |
"base": get_pretrained_model,
|
134 |
"small": get_pretrained_model,
|
135 |
+
"medium": get_pretrained_model,
|
136 |
+
"large": get_pretrained_model,
|
137 |
}
|