csukuangfj commited on
Commit
0f680bc
1 Parent(s): faabceb

add aidatatang_200zh

Browse files
examples.py CHANGED
@@ -130,6 +130,29 @@ examples = [
130
  4,
131
  "./test_wavs/aishell2/ID0012W0215.wav",
132
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  # tal_csasr
134
  # https://huggingface.co/luomingshuang/icefall_asr_tal-csasr_pruned_transducer_stateless5/tree/main/test_wavs
135
  [
 
130
  4,
131
  "./test_wavs/aishell2/ID0012W0215.wav",
132
  ],
133
+ # aishell2-B
134
+ # https://huggingface.co/luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2/tree/main/test_wavs
135
+ [
136
+ "Chinese",
137
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
138
+ "greedy_search",
139
+ 4,
140
+ "./test_wavs/aidatatang_200zh/T0055G0036S0002.wav",
141
+ ],
142
+ [
143
+ "Chinese",
144
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
145
+ "greedy_search",
146
+ 4,
147
+ "./test_wavs/aidatatang_200zh/T0055G0036S0003.wav",
148
+ ],
149
+ [
150
+ "Chinese",
151
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
152
+ "greedy_search",
153
+ 4,
154
+ "./test_wavs/aidatatang_200zh/T0055G0036S0004.wav",
155
+ ],
156
  # tal_csasr
157
  # https://huggingface.co/luomingshuang/icefall_asr_tal-csasr_pruned_transducer_stateless5/tree/main/test_wavs
158
  [
model.py CHANGED
@@ -203,11 +203,33 @@ def _get_alimeeting_pre_trained_model(repo_id: str):
203
  )
204
 
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  chinese_models = {
207
  "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2": _get_wenetspeech_pre_trained_model, # noqa
208
  "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12": _get_aishell2_pretrained_model, # noqa
209
  "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12": _get_aishell2_pretrained_model, # noqa
210
  "luomingshuang/icefall_asr_alimeeting_pruned_transducer_stateless2": _get_alimeeting_pre_trained_model, # noqa
 
211
  }
212
 
213
  english_models = {
 
203
  )
204
 
205
 
206
+ @lru_cache(maxsize=10)
207
+ def _get_aidatatang_200zh_pretrained_mode(repo_id: str):
208
+ assert repo_id in [
209
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2",
210
+ ], repo_id
211
+
212
+ nn_model_filename = _get_nn_model_filename(
213
+ repo_id=repo_id,
214
+ filename="cpu_jit_torch_1.7.1.pt",
215
+ )
216
+ token_filename = _get_token_filename(repo_id=repo_id)
217
+
218
+ return OfflineAsr(
219
+ nn_model_filename=nn_model_filename,
220
+ bpe_model_filename=None,
221
+ token_filename=token_filename,
222
+ sample_rate=sample_rate,
223
+ device="cpu",
224
+ )
225
+
226
+
227
  chinese_models = {
228
  "luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2": _get_wenetspeech_pre_trained_model, # noqa
229
  "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-A-2022-07-12": _get_aishell2_pretrained_model, # noqa
230
  "yuekai/icefall-asr-aishell2-pruned-transducer-stateless5-B-2022-07-12": _get_aishell2_pretrained_model, # noqa
231
  "luomingshuang/icefall_asr_alimeeting_pruned_transducer_stateless2": _get_alimeeting_pre_trained_model, # noqa
232
+ "luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2": _get_aidatatang_200zh_pretrained_mode, # noqa
233
  }
234
 
235
  english_models = {
test_wavs/aidatatang_200zh/README.md ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ Files are downloaded from
2
+ https://huggingface.co/luomingshuang/icefall_asr_aidatatang-200zh_pruned_transducer_stateless2/tree/main/test_wavs
test_wavs/aidatatang_200zh/T0055G0036S0002.wav ADDED
Binary file (67.6 kB). View file
 
test_wavs/aidatatang_200zh/T0055G0036S0003.wav ADDED
Binary file (94.2 kB). View file
 
test_wavs/aidatatang_200zh/T0055G0036S0004.wav ADDED
Binary file (70.5 kB). View file