/docs
en.sent.recscore
Kernel Description
Pass multiple texts and keywords to the engine (does not affect the score), and the engine feeds back the branch read by the user, and gives the total score, fluency score, completeness score, accuracy score, and the hit keywords.
- Support function: English and American pronunciation distinction.
- Suitable for scenarios: man-machine dialogue.
Request Parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
| coreType | String | true | "en.sent.recscore" means AITalk Kernel. |
| refText | String | true | The answer branch list, multiple branch options are separated by | . The number of branches allowed is 2-10. Each branch supports the entire sentence, with punctuation marks, and the number of words is 2-15. See more details about symbolsText Symbol Description |
| keyWords | String | true | Keywords list "#" is the first-level separator, and the parts separated by "#" represent various expressions, and the relationship between them is OR. "|" is the second-level separator, and each key in the method is expressed with "|" Words or phrases are separated, and the relationship is AND. Note: the content of keyWords must appear in the answer branch of the refText field above |
| accent | int | false | Specify British or American pronunciation. 1, 2 or 3, Default value is 3.
|
| attachAudioUrl | number | false | Enable to return audio url or not.
|
| result | object | false | |
| - use_details | Int | false | Set to 1 means that each word score will be displayed. |
Sample Code
{
"coreType": "en.sent.recscore",
"attachAudioUrl": 1,
"refText": " I go to school on foot. | I walk to school. | I go to school by bus. |I go to school. ",
"keyWords": "go to |school | on foot # walk to | school",
"accent": 2,
"result": {
"use_details": 1
}
}
Example of Returned Results
- The results are returned using the JSON structure, Example
Introduction to Returned Results
| Key | Type | Description | Recommendations |
|---|---|---|---|
| uuid | string | Unique id of audio. Save uuid in database in case of need. | For reference |
| audioUrl | string | Audio url.Download audio in http protocol: Just add ".mp3" at the end of the URL. Download audio in https protocol: Remove the port number, add ".mp3" at the end, and add "https://" to the prefix. e.g.https://download.cloud.chivox.com/XXXXXXXX.mp3 Tips:
|
For reference |
| result | object | Recognized result | |
| - wavetime | number | Audio duration (Unit: milliseconds) | For reference |
| - conf | number | Confidence score. The matching degree between the recognized reading content and an answer branch in the text passed to the scoring engine.The threshold is set by the application layer to determine whether the result is correct, generally 75, which can be adjusted up or down according to the difficulty of the question. |
Suggest to display |
| - rec | string | Recognized branch result. | Suggest to display |
| - overall | number | The overall score for evaluating the identified branch options. | Suggest to display |
| - fluency | object | Fluency score details(It has nothing to do with the pronunciation content). | |
| - - overall | number | Overall score of fluency. | Suggest to display |
| - - pause | number | Number of pauses. | For reference |
| - - speed | number | Speech rate, which is the number of words read per minute. | For reference |
| - integrity | number | Score of integrity. | Suggest to display |
| - accuracy | number | Score of accuracy(pronunciation evaluation of the read part). | Suggest to display |
| - starttime | number | The start time of the sentence in audio (Unit: milliseconds). | For reference |
| - endtime | number | The end time of the sentence in audio (Unit: milliseconds). | For reference |
| - recscore | object | Need to configure the keyWords field, see the parameter description above for details. | |
| - - status_code | number | The returned result and description are as follows: Notes:If the conf value is less than 55 points, the status_code here in recscore is set to 20003, and mathed field will be empty. |
Suggest to display |
| - - matched | string | When the return code is 20000、20002, the matched keywords are also returned. | Suggest to display |
| - details | object | ||
| - - char | string | each word text | Suggest to display |
| - - score | number | each word score | Suggest to display |
| - - accent | int | 0, 1, 2 or 3:
|
Suggest to display |
| - - start | number | The start time of the word in audio (Unit: milliseconds). | For reference |
| - - end | number | The end time of the word in audio (Unit: milliseconds). | For reference |
| - info | object | ||
| - - tipId | number | Audio quality For details, please refer to TipId field description |
For reference |
| - - tips | string | Error message promptWhen prompted "post proc failed", it may be that the audio was not successfully recorded or the engine did not detect the user’s valid voice. Prompt the user to re-record | For reference |
Note: The other returned parameters that are not shown above are internal ones, which you don't need to pay much atttention to.
Suggestions for handling scoring results
Firstly, it is judged whether the value of the conf field exceeds the set threshold. If it exceeds, the content of the rec field is extracted, that is, the branch text read by the user is recognized this time. Otherwise, the user is prompted to try to read aloud again or not hear your pronunciation clearly.
