headerobject Properties task_idstring The task ID generated by the client (in UUID format). eventstring The event type. This value is always result-generated. payloadobject Properties outputobject Properties sentenceobject Properties begin_timeinteger The start time of the sentence, in milliseconds. end_timeinteger The end time of the sentence, in milliseconds. textstring The recognized text. heartbeatboolean If this value is true, the result is a heartbeat packet and can be ignored. sentence_beginboolean Indicates the start of a sentence. sentence_endboolean Whether the sentence has ended (true = final result, false = intermediate result). sentence_idinteger The sequence identifier of the sentence. In normal recognition results, sentence_id increments from 1. When heartbeat is true (that is, a heartbeat packet), sentence_id is always 0. wordsarray[object] Word-level timestamp information. Properties begin_timeinteger The start time of the word, in milliseconds. end_timeinteger The end time of the word, in milliseconds. textstring The recognized text. punctuationstring The punctuation mark. usageobject Cumulative usage for the current task as of this event. Properties durationinteger Cumulative audio duration in seconds, retained for compatibility. input_tokensinteger Cumulative number of input tokens. output_tokensinteger Cumulative number of output tokens. total_tokensinteger Cumulative total number of tokens: the sum of input_tokens and output_tokens. | Sentence-start result:{
"header": {
"task_id": "2bf83b9a-baeb-4fda-8d9a-xxxxxxxxxxxx",
"event": "result-generated",
"attributes": {}
},
"payload": {
"output": {
"sentence": {
"sentence_id": 1,
"begin_time": 0,
"end_time": null,
"text": "",
"channel_id": 0,
"speaker_id": null,
"sentence_end": false,
"sentence_begin": true,
"words": []
}
}
}
}
Final result:{
"header": {
"task_id": "2bf83b9a-baeb-4fda-8d9a-xxxxxxxxxxxx",
"event": "result-generated",
"attributes": {}
},
"payload": {
"output": {
"sentence": {
"sentence_id": 1,
"begin_time": 120,
"end_time": 1700,
"text": "欢迎使用阿里云。",
"channel_id": 0,
"speaker_id": null,
"sentence_end": true,
"words": [
{
"begin_time": 120,
"end_time": 520,
"text": "欢迎",
"punctuation": "",
"fixed": false,
"speaker_id": null
},
{
"begin_time": 520,
"end_time": 880,
"text": "使用",
"punctuation": "",
"fixed": false,
"speaker_id": null
},
{
"begin_time": 880,
"end_time": 1700,
"text": "阿里云",
"punctuation": "。",
"fixed": false,
"speaker_id": null
}
],
"stash": {
"sentence_id": 2,
"text": "",
"begin_time": 1700,
"current_time": 1700,
"words": []
}
}
},
"usage": {
"duration": 2,
"input_tokens": 84,
"output_tokens": 4,
"total_tokens": 88
}
}
}
|