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 When payload.output.sentence.sentence_end is false (the current sentence has not ended), usage is null. When payload.output.sentence.sentence_end is true (the current sentence has ended), usage.duration is the billed duration of the current task. Properties durationinteger The billed task duration, in seconds. | Sentence-start result:{
"header": {
"task_id": "2bf83b9a-baeb-4fda-8d9a-xxxxxxxxxxxx",
"event": "result-generated",
"attributes": {}
},
"payload": {
"output": {
"sentence": {
"begin_time": 0,
"end_time": null,
"text": "",
"sentence_begin": true,
"sentence_end": false,
"sentence_id": 1,
"words": []
}
},
"usage": null
}
}
Final result:{
"header": {
"task_id": "2bf83b9a-baeb-4fda-8d9a-xxxxxxxxxxxx",
"event": "result-generated",
"attributes": {}
},
"payload": {
"output": {
"sentence": {
"begin_time": 170,
"end_time": 920,
"text": "OK, got it.",
"heartbeat": false,
"sentence_end": true,
"sentence_id": 1,
"words": [
{
"begin_time": 170,
"end_time": 295,
"text": "OK",
"punctuation": ","
},
{
"begin_time": 295,
"end_time": 503,
"text": "got",
"punctuation": ""
},
{
"begin_time": 503,
"end_time": 711,
"text": "it",
"punctuation": ""
},
{
"begin_time": 711,
"end_time": 920,
"text": "",
"punctuation": "."
}
]
}
},
"usage": {
"duration": 3
}
}
}
|