mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
fix(runtime/go): websocket client premature close in offline mode (#2834)
Move offline_msg_done signal after the ReadMessage loop exits (when server closes connection), not on first message receipt. Previously, multi-segment audio would only get the first segment transcribed before the client closed the connection.
This commit is contained in:
@@ -330,9 +330,9 @@ func message(id string) {
|
||||
text_print += fmt.Sprintf("%s ", text)
|
||||
}
|
||||
fmt.Println("\rpid" + id + ": " + wav_name + ": " + text_print)
|
||||
offline_msg_done = true
|
||||
}
|
||||
}
|
||||
offline_msg_done = true
|
||||
}
|
||||
|
||||
func wsClient(id, chunk_begin, chunk_size int, done chan bool) {
|
||||
|
||||
Reference in New Issue
Block a user