FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

websocket python服务端使用热词无效

Open amazeyin2 opened this issue 7 months ago • 2 comments

热词无效问题

问题

runtime/python/websocket/funasr_wss_server.py 作为服务端时,客户端传参热词没有效果

客户端建立连接时参数如下:

{ "chunk_size": [ 5, 10, 5 ], "wav_name": "h5", "is_speaking": true, "chunk_interval": 10, "itn": false, "mode": "2pass", "hotwords": "{\"张謇\":30}" } }

asr模型

iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch

测试结果如图

Image

其他

在docker容器中 使用run_server_2pass.sh 启动作为服务端时,可以匹配热词。 怀疑是python wss server中调用模型推理时热词传参有问题,请帮忙解答

amazeyin2 avatar Apr 08 '25 10:04 amazeyin2