WebSocket server event reference for Fun-ASR real-time speech recognition
The Fun-ASR real-time speech recognition service delivers four types of server-side events to the client over WebSocket:
Description: The task has started successfully. The client can begin sending audio data.
Description: A recognition result. Includes interim results (
Description: The task ended normally. The connection can be closed or reused.
Description: The task failed. The connection is closed and cannot be reused.
task-started, result-generated, task-finished, and task-failed.
User guide: For model details and selection guidance, see Speech-to-text models.
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.
Example
object
body
Message header.
object
body
Always
{}.result-generated
Description: A recognition result. Includes interim results (sentence_end=false) and final results (sentence_end=true).
Example
object
body
Message header.
object
body
Message payload.
task-finished
Description: The task ended normally. The connection can be closed or reused.
Example
object
body
Message header.
object
body
Typically
{}; the contents are not relevant.task-failed
Description: The task failed. The connection is closed and cannot be reused.
Example
object
body
Message header.
object
body
Always
{}.