Commit
·
0c2bc86
1
Parent(s):
b1459d7
Add zipformer
Browse files
model.py
CHANGED
@@ -123,11 +123,16 @@ def _get_gigaspeech_pre_trained_model(repo_id: str) -> OfflineAsr:
|
|
123 |
def _get_librispeech_pre_trained_model(repo_id: str) -> OfflineAsr:
|
124 |
assert repo_id in [
|
125 |
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13", # noqa
|
|
|
126 |
], repo_id
|
127 |
|
|
|
|
|
|
|
|
|
128 |
nn_model_filename = _get_nn_model_filename(
|
129 |
repo_id=repo_id,
|
130 |
-
filename=
|
131 |
)
|
132 |
bpe_model_filename = _get_bpe_model_filename(repo_id=repo_id)
|
133 |
|
@@ -234,6 +239,7 @@ chinese_models = {
|
|
234 |
|
235 |
english_models = {
|
236 |
"wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2": _get_gigaspeech_pre_trained_model, # noqa
|
|
|
237 |
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13": _get_librispeech_pre_trained_model, # noqa
|
238 |
}
|
239 |
|
|
|
123 |
def _get_librispeech_pre_trained_model(repo_id: str) -> OfflineAsr:
|
124 |
assert repo_id in [
|
125 |
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13", # noqa
|
126 |
+
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11", # noqa
|
127 |
], repo_id
|
128 |
|
129 |
+
filename = "cpu_jit.pt"
|
130 |
+
if repo_id == "csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11":
|
131 |
+
filename = "cpu_jit-torch-1.10.0.pt"
|
132 |
+
|
133 |
nn_model_filename = _get_nn_model_filename(
|
134 |
repo_id=repo_id,
|
135 |
+
filename=filename,
|
136 |
)
|
137 |
bpe_model_filename = _get_bpe_model_filename(repo_id=repo_id)
|
138 |
|
|
|
239 |
|
240 |
english_models = {
|
241 |
"wgb14/icefall-asr-gigaspeech-pruned-transducer-stateless2": _get_gigaspeech_pre_trained_model, # noqa
|
242 |
+
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11": _get_librispeech_pre_trained_model, # noqa
|
243 |
"csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13": _get_librispeech_pre_trained_model, # noqa
|
244 |
}
|
245 |
|