microsoft / NeuralSpeech

MIT License
1.37k stars 185 forks source link

SoftCorrect:eval_detector.py 文件中第95行 assert text_length % 4 == 0 ,是要保证 CTC 多候选序列必须等长吗? #122

Open gangkou2020 opened 9 months ago

gangkou2020 commented 9 months ago

本人使用 SoftCorrect 对 wenet 的 CTC 多候选序列进行纠错时遇到以下问题:

test checkpoints/detector_finetune/checkpoint16.pt
infile_list: ['test']
Setting word embedding dropout of encoder to 0.0
Decoder not exit! Using bos eos from encoder!
werdur_max_predict:  5.0
werdur_loss_type:  l2
eval_data/aishell_nbest_eval_detector/test/aligned_nbest_token_raw.data.json    一 二 线 城 市 虽 然 也 处 于 调 整 中 一 二 线 城 市 虽 杨 也 处 于 调 整 中 一 二 线 城 市 孙 然 也 处 于 调 整 中 一 二 线 城 市 虽 然 也 处 于 调 整

Traceback (most recent call last):
  File "eval_detector.py", line 95, in <module>
    assert text_length % 4 == 0
AssertionError

请问是必须保证这几个候选序列等长吗,还是有其他考虑?

yang20000825 commented 5 months ago

请问复现成功了吗

gangkou2020 commented 5 months ago

请问复现成功了吗

@yang20000825 官方提供的espnet CTC多候选测试数据可以纠错,对wenet导出的多候选序列进行纠错会报上述错误,不清楚如何解决