csukuangfj commited on
Commit
4f2f99b
1 Parent(s): 156330a

add a new japanese model

Browse files
examples.py CHANGED
@@ -64,6 +64,14 @@ examples = [
64
  "Yes",
65
  "./test_wavs/paraformer-zh/四川话.wav",
66
  ],
 
 
 
 
 
 
 
 
67
  [
68
  "Korean",
69
  "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
@@ -501,4 +509,36 @@ examples = [
501
  "Yes",
502
  "./test_wavs/sense_voice/ko.wav",
503
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  ]
 
64
  "Yes",
65
  "./test_wavs/paraformer-zh/四川话.wav",
66
  ],
67
+ [
68
+ "Japanese",
69
+ "reazon-research/reazonspeech-k2-v2",
70
+ "greedy_search",
71
+ 4,
72
+ "No",
73
+ "./test_wavs/japanese/1.wav",
74
+ ],
75
  [
76
  "Korean",
77
  "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
 
509
  "Yes",
510
  "./test_wavs/sense_voice/ko.wav",
511
  ],
512
+ [
513
+ "Japanese",
514
+ "reazon-research/reazonspeech-k2-v2",
515
+ "greedy_search",
516
+ 4,
517
+ "No",
518
+ "./test_wavs/japanese/2.wav",
519
+ ],
520
+ [
521
+ "Japanese",
522
+ "reazon-research/reazonspeech-k2-v2",
523
+ "greedy_search",
524
+ 4,
525
+ "No",
526
+ "./test_wavs/japanese/3.wav",
527
+ ],
528
+ [
529
+ "Japanese",
530
+ "reazon-research/reazonspeech-k2-v2",
531
+ "greedy_search",
532
+ 4,
533
+ "No",
534
+ "./test_wavs/japanese/4.wav",
535
+ ],
536
+ [
537
+ "Japanese",
538
+ "reazon-research/reazonspeech-k2-v2",
539
+ "greedy_search",
540
+ 4,
541
+ "No",
542
+ "./test_wavs/japanese/5.wav",
543
+ ],
544
  ]
model.py CHANGED
@@ -309,7 +309,10 @@ def _get_aishell2_pretrained_model(
309
  def _get_offline_pre_trained_model(
310
  repo_id: str, decoding_method: str, num_active_paths: int
311
  ) -> sherpa_onnx.OfflineRecognizer:
312
- assert repo_id in ("k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",), repo_id
 
 
 
313
 
314
  encoder_model = _get_nn_model_filename(
315
  repo_id=repo_id,
@@ -1553,6 +1556,7 @@ french_models = {
1553
  }
1554
 
1555
  japanese_models = {
 
1556
  "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-fluent": _get_japanese_pre_trained_model,
1557
  "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-disfluent": _get_japanese_pre_trained_model,
1558
  }
 
309
  def _get_offline_pre_trained_model(
310
  repo_id: str, decoding_method: str, num_active_paths: int
311
  ) -> sherpa_onnx.OfflineRecognizer:
312
+ assert repo_id in (
313
+ "k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24",
314
+ "reazon-research/reazonspeech-k2-v2",
315
+ ), repo_id
316
 
317
  encoder_model = _get_nn_model_filename(
318
  repo_id=repo_id,
 
1556
  }
1557
 
1558
  japanese_models = {
1559
+ "reazon-research/reazonspeech-k2-v2": _get_offline_pre_trained_model,
1560
  "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-fluent": _get_japanese_pre_trained_model,
1561
  "TeoWenShen/icefall-asr-csj-pruned-transducer-stateless7-streaming-230208-disfluent": _get_japanese_pre_trained_model,
1562
  }
test_wavs/japanese/1.wav ADDED
Binary file (430 kB). View file
 
test_wavs/japanese/2.wav ADDED
Binary file (212 kB). View file
 
test_wavs/japanese/3.wav ADDED
Binary file (199 kB). View file
 
test_wavs/japanese/4.wav ADDED
Binary file (328 kB). View file
 
test_wavs/japanese/5.wav ADDED
Binary file (447 kB). View file
 
test_wavs/japanese/transcript.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 1.wav 気象庁は、雪や路面の凍結による交通への影響、暴風雪や高波に警戒するとともに、雪崩や屋根からの落雪にも十分注意するよう呼びかけています。
2
+ 2.wav はやくおじいさんにあのおとこのはなしをきかせたかったのです。
3
+ 3.wav ヤンバルクイナとの出会いは18歳の時だった。
4
+ 4.wav H2Aは、打ち上げの成功率は高い一方、1回の打ち上げ費用がおよそ100億円と、高額であることが課題となっていました。
5
+ 5.wav 持ち主とはぐれた傘が風で舞い看板もなぎ倒されてしまったようです。