Responses to Recognition Results
After receiving the continuous audio data from the client, the server sends the recognition results back by sentence in real time. The result responses (JSON character strings) are put in text messages.
Response
Parameter |
Type |
Description |
---|---|---|
resp_type |
String |
Response type. The value of this parameter is RESULT, indicating the recognition result response. |
trace_id |
String |
Service internal token used to trace a specific process in logs |
segments |
Array of objects |
Result of multiple segments. For details, see Table 2. |
Parameter |
Type |
Description |
---|---|---|
start_time |
Integer |
Relative timestamp, indicating the start of a sentence. The unit is millisecond (ms). |
end_time |
Integer |
Relative timestamp, indicating the end of a sentence. The unit is millisecond (ms). |
is_final |
Boolen |
Indicates whether the output is the final result. The value true indicates that the result is the final result, and the value false indicates that the result is a temporary intermediate result. |
result |
Object |
If the calling is successful, this parameter indicates the recognition result. Otherwise, this parameter is invalid. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
text |
String |
Recognition result |
score |
Float |
Confidence level of the recognition result. The value ranges from 0 to 1. The value is continuously updated during real-time recognition until the final result is returned.
NOTE:
The confidence level of the temporary result does not play a significant role. Do not overly depend on this value. |
Example
{ "resp_type": "RESULT", "trace_id": "b08a4603-3e1a-4f30-ae07-b2bbabe2e8d7", "segments": [ { "start_time": 0, "end_time": 3159, "is_final": true, "result": { "text": "hello everybody", "score": 0.9178787469863892, "word_info": [ { "start_time": 920, "end_time": 1200, "word": "▁HE" }, { "start_time": 1200, "end_time": 1380, "word": "LL" }, { "start_time": 1380, "end_time": 1500, "word": "O" }, { "start_time": 1580, "end_time": 2040, "word": "▁EVERYBODY" } ] } } ] }
Status Code
For details about status codes, see Status Codes.
Error Code
For details about error codes, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot