-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
questionFurther information is requestedFurther information is requested
Description
使用的是仓库提供的代码样例:
https://github.com/modelscope/FunASR/blob/main/runtime/golang/websocket/go_ws_client.go
在这一行(第326行)中有这样的逻辑:
if meg.Mode == "offline" {
if timestamp != "" {
text_print += fmt.Sprintf("%s timestamp: %s", text, timestamp)
} else {
text_print += fmt.Sprintf("%s ", text)
}
fmt.Println("\rpid" + id + ": " + wav_name + ": " + text_print)
offline_msg_done = true
}但是在websocket的返回结果中每个meg的Mode值都是offline,这就会导致websocket接口提前关闭连接,进而引发中断,文件没处理完就提前中止了
针对这个问题目前我的解决办法是不主动关闭websocket连接,设置定时器假设为30秒,如果websocket接口持续30秒不返回数据默认就是处理结束,除了这个办法以外大家还有什么好办法吗?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested