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.08k stars 1.07k forks source link

K2 hlg 解码问题请教 #2502

Closed mahuichao closed 2 months ago

mahuichao commented 5 months ago

请问目前wenet-main中,对于k2 的hlg解码,也就是aishell/s0/run.sh中的第8阶段是否支持了呢。

我查看源码(以tranformer模型为例子),在init_model.py中,在选取类的时候,并没有走k2_model,而是走的asr_model(从yaml中读取而来),如下: image 且在对应的recognize.py中,有三个TODO,有一个对应K2的解码,所以这里很是疑惑,求解一下。 image

Mddct commented 4 months ago

需要自己改下,初始化model为k2 并且 model.decode 直接调用 model.hlgxxx