Z-yq / TensorflowASR

一个执着于让CPU\端侧-Model逼近GPU-Model性能的项目,CPU上的实时率(RTF)小于0.1
Apache License 2.0
461 stars 111 forks source link

想问一下楼主这个出错是什么问题 #37

Closed fjw1049 closed 3 years ago

fjw1049 commented 3 years ago

Traceback (most recent call last): File "run-test.py", line 82, in asr = ASR(am_config, lm_config,punc_config) File "run-test.py", line 12, in init self.lm = LM(lm_config,punc_config) File "/home/w/ASR/LMmodel/trm_lm.py", line 16, in init self.am_featurizer = TextFeaturizer(config['am_token']) File "/home/w/ASR/utils/text_featurizers.py", line 78, in init self.stop = self.endid() File "/home/w/ASR/utils/text_featurizers.py", line 90, in endid return self.token_to_index[''] KeyError: ''

ChristopheZhao commented 3 years ago

这个地方代码对应的是将end_token转为id,你自己定义的词表里没有加入' \</S> '?