Updated on 2025-08-26 GMT+08:00

Responses to Recognition End Requests

When the server receives a "recognition end" request or if an error occurs during the speech recognition process, the server will push the following response message to the client, formatted as a JSON string within the text message.

Response Parameters

Table 1 Response parameters

Parameter

Type

Description

resp_type

String

Response type. The value of this parameter is END, indicating the response to a recognition ending request.

trace_id

String

Service internal token used to trace a specific process in logs

reason

String

End cause. For details, see Table 2.

Table 2 End causes

Parameter

Description

NORMAL

The process ends normally.

CANCEL

The user cancels the process. When the client sends a "recognition ending" command, the value of parameter cancel is true.

ERROR

An error occurred during the recognition process.

Example

{
    "resp_type": "END",
    "trace_id": "567e8537-a89c-13c3-a882-826321939651",
    "reason": "NORMAL",
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.