-
Notifications
You must be signed in to change notification settings - Fork 21
Description
现象:
使用Recognition .streamCall(param, source) 进行ASR识别, 当长时间不说话后,再说一两句,就会无ASR内容返回,但实际已经响应
参数:RecognitionParam.builder()
.model(model)
.format(effectiveFormat)
.sampleRate(effectiveSampleRate)
.parameter("heartbeat", true)
.parameter("semantic_punctuation_enabled", true)
.apiKey(aliConfig.getAli().getApiKey())
.build();
预期: OkHttpWebSocketClient 后有Recognition 也进行日志打印
2025-12-16 17:17:02.654 DEBUG [] pe.protocol.okhttp.OkHttpWebSocketClient.onMessage:245 : {"header":{"task_id":"bdd3c1c4-3969-4eda-8533-ea5abdb9ccd4","event":"result-generated","attributes":{}},"payload":{"output":{"sentence":{"sentence_id":2,"begin_time":23560,"end_time":null,"text":"那你们几","channel_id":0,"speaker_id":null,"sentence_end":false,"words":[{"begin_time":23560,"end_time":23820,"text":"那你","punctuation":"","fixed":false,"speaker_id":null},{"begin_time":23820,"end_time":24080,"text":"们几","punctuation":"","fixed":false,"speaker_id":null}]}}}}
2025-12-16 17:17:02.655 DEBUG [] hscope.audio.asr.recognition.Recognition.lambda$streamCall$4:146 : Recv Result: 那你们几, isEnd: false
实际:OkHttpWebSocketClient 后无 Recognition 日志打印
2025-12-16 17:17:24.147 DEBUG [] pe.protocol.okhttp.OkHttpWebSocketClient.onMessage:245 : {"header":{"task_id":"e2041bb2-4421-48af-b814-aa6de32f14ab","event":"result-generated","attributes":{}},"payload":{"output":{"sentence":{"sentence_id":0,"begin_time":0,"end_time":null,"text":"","channel_id":0,"speaker_id":null,"sentence_end":false,"heartbeat":true,"words":[]}}}}
2025-12-16 17:17:24.261 DEBUG [] hscope.audio.asr.recognition.Recognition.lambda$streamCall$0:120 : send audio frame: 729