wenet-e2e / wenet

Production First and Production Ready End-to-End Speech Recognition Toolkit
https://wenet-e2e.github.io/wenet/
Apache License 2.0
4.14k stars 1.07k forks source link

LibTorch get Chinese garbled characters #1672

Closed DaobinZhu closed 1 year ago

DaobinZhu commented 1 year ago

Hello, when I used LibTorch to decode (decoder_main), I encountered the problem of Chinese garbled characters. I use the data set is Aishell-1, and unit_table is /wenet/examples/Aishell s0/ data/dict/lang_char.txt. I generated final.zip after stage 6 of run.sh, using the same dictionary /wenet/examples/Aishell s0/ data/dict/lang_char.txt.

However, the error log is as follows:

I0130 20:15:18.808750 186759 asr_decoder.cc:104] Required 67 get 67 I0130 20:15:18.869403 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃 I0130 20:15:18.869508 186759 asr_decoder.cc:104] Required 64 get 64 I0130 20:15:18.928126 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃涝糙幻嗽貌殃燊瞻涤铃草喽读 I0130 20:15:18.928225 186759 asr_decoder.cc:104] Required 64 get 64 I0130 20:15:18.983222 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃涝糙幻嗽貌殃燊瞻涤铃草喽读矩轩寨季咎岂乙疤舛烂览兹烂丑泔 I0130 20:15:18.983327 186759 asr_decoder.cc:104] Required 64 get 64 I0130 20:15:19.044641 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃涝糙幻嗽貌殃燊瞻涤铃草喽读矩轩寨季咎岂乙疤舛烂览兹烂丑泔秽掩列聘惨妃喽泌推钛殃骋伯屯递褒 I0130 20:15:19.044744 186759 asr_decoder.cc:104] Required 64 get 64 I0130 20:15:19.111181 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃涝糙幻嗽貌殃燊瞻涤铃草喽读矩轩寨季咎岂乙疤舛烂览兹烂丑泔秽掩列聘惨妃喽泌推钛殃骋伯屯递褒溧喇畜酌咎岂螺鄙忑鄙弓雍矣茵 I0130 20:15:19.111260 186759 asr_decoder.cc:104] Required 64 get 25 I0130 20:15:19.147778 186759 asr_decoder.cc:200] Partial CTC result 妒甫喻侠徇螳淳甫茵脂匀娠铃涝糙幻嗽貌殃燊瞻涤铃草喽读矩轩寨季咎岂乙疤舛烂览兹烂丑泔秽掩列聘惨妃喽泌推钛殃骋伯屯递褒溧喇畜酌咎岂螺鄙忑鄙弓雍矣镑惠

xingchensong commented 1 year ago

python recognize.py的结果正常吗?

DaobinZhu commented 1 year ago

python recognize.py的结果正常吗?

utt: BAC009S0916W0494 WER: 0.00 % N=11 C=11 S=0 D=0 I=0 lab: 存 在 无 法 如 期 还 贷 的 风 险 rec: 存 在 无 法 如 期 还 贷 的 风 险

utt: BAC009S0916W0495 WER: 15.38 % N=13 C=11 S=2 D=0 I=0 lab: 这 令 被 贷 款 的 员 工 们 寝 食 难 安 rec: 这 令 被 贷 款 的 员 工 们 请 时 难 安

===========================================================================

Overall -> 4.89 % N=104765 C=99736 S=4807 D=222 I=97 Mandarin -> 4.89 % N=104762 C=99736 S=4804 D=222 I=97 Other -> 100.00 % N=3 C=0 S=3 D=0 I=0

=========================================================================== 在生成的文件里看是正常的

xingchensong commented 1 year ago

https://github.com/wenet-e2e/wenet/blob/main/docs/pretrained_models.en.md 试一下这里下载的aishell模型

DaobinZhu commented 1 year ago

https://github.com/wenet-e2e/wenet/blob/main/docs/pretrained_models.en.md 试一下这里下载的aishell模型

预训练模型可以正常显示,看来不是终端的问题,这么看就是导出模型那里出错了,我在stage 6使用的代码是:

python wenet/bin/export_jit.py \ --config /home/SuXiangDong/GPU20StuA/zdb/wenet/examples/aishell/s0/exp/save_maximum_value_0.05_0.5_0.5_4gpu/train.yaml \ --checkpoint /home/SuXiangDong/GPU20StuA/zdb/wenet/examples/aishell/s0/exp/save_maximum_value_0.05_0.5_0.5_4gpu/avg_30.pt \ --output_file /home/SuXiangDong/GPU20StuA/zdb/wenet/examples/aishell/s0/exp/save_maximum_value_0.05_0.5_0.5_4gpu/final.zip \ --output_quant_file /home/SuXiangDong/GPU20StuA/zdb/wenet/examples/aishell/s0/exp/save_maximum_value_0.05_0.5_0.5_4gpu/final_quant.zip

xingchensong commented 1 year ago

先别直接用下载的zip,先下载预训练的ckpt,用你的本地代码导出这个ckpt对应的zip,然后试试?(确保本地代码是正确的)

DaobinZhu commented 1 year ago

重新导出了一下,没有报错,分别打印日志 Export model successfully, see exp/save_maximum_value_0.05_0.5_0.5_4gpu/final.zip

Export quantized model successfully, see exp/save_maximum_value_0.05_0.5_0.5_4gpu/final_quant.zip

但是依然是中文乱码: (zdb_k2) [GPU20StuA@gpu20 libtorch]$ ./build/bin/decoder_main \

--chunk_size -1 \
--wav_path /home/SuXiangDong/GPU20StuA/zdb/wenet-runtime/BAC009S0723W0494.wav \
--model_path /home/SuXiangDong/GPU20StuA/zdb/wenet-runtime/wenet/examples/aishell/s0/exp/normal_0.05_0.5_0.5/final.zip \
--unit_path /home/SuXiangDong/GPU20StuA/zdb/wenet-runtime/wenet/examples/aishell/s0/exp/normal_0.05_0.5_0.5/units.txt

I0131 11:03:43.559480 228495 params.h:149] Reading torch model /home/SuXiangDong/GPU20StuA/zdb/wenet-runtime/wenet/examples/aishell/s0/exp/normal_0.05_0.5_0.5/final.zip I0131 11:03:43.578749 228495 torch_asr_model.cc:34] Num intra-op threads: 1 I0131 11:03:43.976596 228495 torch_asr_model.cc:69] Torch Model Info: I0131 11:03:43.976639 228495 torch_asr_model.cc:70] subsampling_rate 4 I0131 11:03:43.976667 228495 torch_asr_model.cc:71] right context 6 I0131 11:03:43.976677 228495 torch_asr_model.cc:72] sos 4232 I0131 11:03:43.976691 228495 torch_asr_model.cc:73] eos 4232 I0131 11:03:43.976702 228495 torch_asr_model.cc:74] is bidirectional decoder 0 I0131 11:03:43.976730 228495 params.h:181] Reading unit table /home/SuXiangDong/GPU20StuA/zdb/wenet-runtime/wenet/examples/aishell/s0/exp/normal_0.05_0.5_0.5/units.txt I0131 11:03:43.982861 228495 decoder_main.cc:162] Warming up... I0131 11:03:44.010190 228543 decoder_main.cc:54] num frames 445 I0131 11:03:44.010504 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:44.625986 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:44.627693 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:45.504362 228543 asr_decoder.cc:84] Rescoring cost latency: 878ms. I0131 11:03:45.504459 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:45.504488 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:45.504513 228543 decoder_main.cc:105] Decoded 4473ms audio taken 1494ms. I0131 11:03:45.531821 228543 decoder_main.cc:54] num frames 445 I0131 11:03:45.532112 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:48.492406 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:48.494576 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:50.359531 228543 asr_decoder.cc:84] Rescoring cost latency: 1866ms. I0131 11:03:50.359589 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:50.359611 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:50.359624 228543 decoder_main.cc:105] Decoded 4473ms audio taken 4827ms. I0131 11:03:50.403259 228543 decoder_main.cc:54] num frames 445 I0131 11:03:50.403524 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:50.684582 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:50.686447 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:51.241362 228543 asr_decoder.cc:84] Rescoring cost latency: 556ms. I0131 11:03:51.241438 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:51.241456 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:51.241472 228543 decoder_main.cc:105] Decoded 4473ms audio taken 838ms. I0131 11:03:51.268757 228543 decoder_main.cc:54] num frames 445 I0131 11:03:51.269037 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:51.528084 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:51.529947 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.065088 228543 asr_decoder.cc:84] Rescoring cost latency: 536ms. I0131 11:03:52.065384 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.065503 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.065600 228543 decoder_main.cc:105] Decoded 4473ms audio taken 796ms. I0131 11:03:52.097184 228543 decoder_main.cc:54] num frames 445 I0131 11:03:52.097450 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:52.365600 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.367478 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.982506 228543 asr_decoder.cc:84] Rescoring cost latency: 616ms. I0131 11:03:52.982555 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.982574 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:52.982609 228543 decoder_main.cc:105] Decoded 4473ms audio taken 885ms. I0131 11:03:53.009716 228543 decoder_main.cc:54] num frames 445 I0131 11:03:53.009945 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:53.304854 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:53.306826 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:53.878079 228543 asr_decoder.cc:84] Rescoring cost latency: 572ms. I0131 11:03:53.878131 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:53.878147 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:53.878158 228543 decoder_main.cc:105] Decoded 4473ms audio taken 868ms. I0131 11:03:53.905160 228543 decoder_main.cc:54] num frames 445 I0131 11:03:53.905431 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:54.199677 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:54.201543 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:54.785634 228543 asr_decoder.cc:84] Rescoring cost latency: 585ms. I0131 11:03:54.785689 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:54.785710 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:54.785722 228543 decoder_main.cc:105] Decoded 4473ms audio taken 880ms. I0131 11:03:54.813023 228543 decoder_main.cc:54] num frames 445 I0131 11:03:54.813289 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:55.103689 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:55.105563 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:55.656038 228543 asr_decoder.cc:84] Rescoring cost latency: 552ms. I0131 11:03:55.656090 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:55.656107 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:55.656117 228543 decoder_main.cc:105] Decoded 4473ms audio taken 842ms. I0131 11:03:55.683168 228543 decoder_main.cc:54] num frames 445 I0131 11:03:55.683419 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:55.935370 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:55.937228 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:56.470103 228543 asr_decoder.cc:84] Rescoring cost latency: 534ms. I0131 11:03:56.470155 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:56.470180 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:56.470191 228543 decoder_main.cc:105] Decoded 4473ms audio taken 786ms. I0131 11:03:56.497203 228543 decoder_main.cc:54] num frames 445 I0131 11:03:56.497463 228543 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:56.761112 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:56.762981 228543 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:57.301512 228543 asr_decoder.cc:84] Rescoring cost latency: 540ms. I0131 11:03:57.301559 228543 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:57.301577 228543 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:57.301587 228543 decoder_main.cc:105] Decoded 4473ms audio taken 804ms. I0131 11:03:57.302626 228495 decoder_main.cc:170] Warmup done. I0131 11:03:57.329722 228670 decoder_main.cc:54] num frames 445 I0131 11:03:57.329974 228670 asr_decoder.cc:104] Required 2147483647 get 445 I0131 11:03:57.568558 228670 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:57.570253 228670 asr_decoder.cc:200] Partial CTC result 喻芋镑蝶喻禄聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋煜柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:58.104626 228670 asr_decoder.cc:84] Rescoring cost latency: 535ms. I0131 11:03:58.104677 228670 decoder_main.cc:72] Partial result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:58.104698 228670 decoder_main.cc:104] test Final result: 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:58.104710 228670 decoder_main.cc:105] Decoded 4473ms audio taken 774ms. test 喻芋镑蝶喻聘雍聘镑琵寡固沽疵娠柱褪妒笋澄娠腓薛笋柱笋耕烯笋唤煜牢勾雍勾雍褒沽莠纤耕姗烃巩振醛锐笋煜禄帆佑余贯杏坪掴覃惠妖勾雍勾侵喻琵诸莠耕帆勘苇帆疵楞杜竣勇漏帆锄榆勾榆喻雍镑雍 I0131 11:03:58.107314 228495 decoder_main.cc:180] Total: decoded 4473ms audio taken 774ms. I0131 11:03:58.107338 228495 decoder_main.cc:182] RTF: 0.173

DaobinZhu commented 1 year ago

先别直接用下载的zip,先下载预训练的ckpt,用你的本地代码导出这个ckpt对应的zip,然后试试?(确保本地代码是正确的)

好的,我现在试一下

DaobinZhu commented 1 year ago

先别直接用下载的zip,先下载预训练的ckpt,用你的本地代码导出这个ckpt对应的zip,然后试试?(确保本地代码是正确的)

导出后结果却是是正常的

xingchensong commented 1 year ago

那这个确实比较奇怪了,我也没啥想法了

DaobinZhu commented 1 year ago

我测试了我自己的final.pt也是正常的,看来问题出自平均模型这部分,谢谢大佬

DaobinZhu commented 1 year ago

似乎和train.yaml有关系,我这个代码是之前跑的,train.yaml有71行,而下载的预训练模型里的yaml有78行,我用之前的版本重新编译一下

DaobinZhu commented 1 year ago

找到错误的原因了,我这个模型是2021年的远古版本,但是我编译是用的最新的代码,我拿之前的模型放到新代码这里进行导出zip格式的模型就会中文乱码,我在远古代码那里导出然后用新代码解码就正常了

code1edoc commented 2 months ago

找到错误的原因了,我这个模型是2021年的远古版本,但是我编译是用的最新的代码,我拿之前的模型放到新代码这里进行导出zip格式的模型就会中文乱码,我在远古代码那里导出然后用新代码解码就正常了

我也遇到了相同问题,我将预训练的aishell, @aishell2的checkpoint使用export_jit.py去解码之后,用得到的final.zip去识别都得到中文乱码;我自己也使用aishell的数据集从头使用提供的run.sh脚本来训练了一个模型,导出后识别结果与预训练的aishell checkpoint一样都是乱码。而wenetspeech的checkpoint导出之后有正常的识别结果。是aishell, aishell2的训练脚本run.sh中哪里出现问题了吗? @DaobinZhu 我想要在预训练模型的基础上再训练,但是不知道aishell的run.sh脚本哪里出现了问题?