PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
10.99k stars 1.83k forks source link

运行stage3时报错 #1524

Closed larry-xue closed 2 years ago

larry-xue commented 2 years ago

我是使用ubuntu docker安装的gpu版本的paddle

(1)在/example/aishell/asr0中运行bash run.sh --stage 3 --stop_stage 3,模型是下载后再解压到asr0中的预训练模型

报错: 2022-03-03 04:26:05.990 | INFO | paddlespeech.s2t.frontend.featurizer.text_featurizer:_load_vocabulary_from_file:234 - MASKCTC id: -1 2022-03-03 04:26:05.991 | INFO | paddlespeech.s2t.exps.deepspeech2.model:setup_dataloader:240 - Setup test Dataloader! main_sp(config, args) File "/PaddleSpeech/paddlespeech/s2t/exps/deepspeech2/bin/test.py", line 25, in main_sp exp.setup() File "/PaddleSpeech/paddlespeech/s2t/training/trainer.py", line 155, in setup self.setup_model() File "/PaddleSpeech/paddlespeech/s2t/exps/deepspeech2/model.py", line 146, in setup_model model = DeepSpeech2Model.from_config(config) File "/PaddleSpeech/paddlespeech/s2t/models/ds2/deepspeech2.py", line 233, in from_config share_rnn_weights=config.share_rnn_weights, File "/usr/local/python3.7.0/lib/python3.7/site-packages/yacs/config.py", line 141, in getattr raise AttributeError(name) AttributeError: share_rnn_weights Failed in evaluation!

(2)在/example/tiny/asr0中运行bash run.sh --stage 3 --stop_stage 3时报错: 2022-03-03 04:31:24.538 | INFO | paddlespeech.s2t.modules.ctc:_init_ext_scorer:184 - begin to initialize the external scorer for decoding 2022-03-03 04:31:24.538 | INFO | paddlespeech.s2t.training.timer:exit:44 - Test/Decode Done: 0:00:00.451815 main(config, args) File "/PaddleSpeech/paddlespeech/s2t/exps/deepspeech2/bin/test.py", line 30, in main main_sp(config, args) File "/PaddleSpeech/paddlespeech/s2t/exps/deepspeech2/bin/test.py", line 26, in main_sp exp.run_test() File "/PaddleSpeech/paddlespeech/s2t/training/trainer.py", line 355, in run_test self.test() File "/PaddleSpeech/paddlespeech/s2t/utils/mp_tools.py", line 27, in wrapper result = func(*args, kwargs) File "/usr/local/python3.7.0/lib/python3.7/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), *kw) File "/usr/local/python3.7.0/lib/python3.7/site-packages/paddle/fluid/dygraph/base.py", line 331, in _decorate_function return func(args, kwargs) File "/PaddleSpeech/paddlespeech/s2t/exps/deepspeech2/model.py", line 316, in test decode_cfg.cutoff_top_n, decode_cfg.num_proc_bsearch) File "/PaddleSpeech/paddlespeech/s2t/modules/ctc.py", line 280, in init_decoder vocab_list) File "/PaddleSpeech/paddlespeech/s2t/modules/ctc.py", line 186, in _init_ext_scorer self._ext_scorer = Scorer(beam_alpha, beam_beta, NameError: name 'Scorer' is not defined Failed in evaluation!

请问是为什么,运行前面的stage就不会报错,stage4导出也是正常的

yt605155624 commented 2 years ago

Duplicate of https://github.com/PaddlePaddle/PaddleSpeech/issues/1503

larry-xue commented 2 years ago

same as #1503

请问那上面的AttributeError: share_rnn_weights这个错误是为什么呢?

Jackwaterveg commented 2 years ago

请问是否使用了 ds2_offline 的模型的config ?我猜测你可能使用了 ds2_online 的 config

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.