The Fun-ASR real-time speech recognition service delivers four types of server-side events to the client over WebSocket: task-started, result-generated, task-finished, and task-failed. The following sections describe the data structure and fields of each event.
User guide: For model details and selection guidance, see Speech-to-text.
Event flow: For the event interaction sequence, see WebSocket API.
task-started
Description: The task has started successfully. The client can begin sending audio data.
header | |
payload Always |
result-generated
Description: A recognition result. Includes interim results (sentence_end=false) and final results (sentence_end=true).
header | |
payload |
task-finished
Description: The task ended normally. The connection can be closed or reused.
header | |
payload Typically |
task-failed
Description: The task failed. The connection is closed and cannot be reused.
header | |
payload Always |