/docs
en.sent.pron
Kernel Description
- Support word-level superfluous reading, missed-reading, and wrong-reading detection;
- Support the detection of stress, pause, rising and falling tone at the end of a sentence;
- Adjust scoring tightness;
- Support real-time feedback of words that have been spoken and evaluation scores;
- Support specifying British or American pronunciation.
Request Parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
| coreType | String | true | "en.sent.pron" means Sentence Pronunciation Correction kernel. |
| accent | int | false | Specify British or American pronunciation. 1, 2 or 3, Default value is 3.
|
| refText | String | true | The English sentence you want to envalate the recording with. We recommend sentence consisting of 2 to 20 words.Punctuation details reference see Text Symbol Description |
| rank | int | true | Grading points system, fill in 100. |
| voiced | int | false | Voiced switch, you can fill in 0 or 1, the default is 1. 0: The user's voiced and non-voiced pronunciation are both considered correct. 1: The user's pronunciation must be voiced to be correct. |
| attachAudioUrl | number | false | Enable to return audio url or not.
|
| result | object | false | Results control parameters. |
| - details | object | false | Detailed scoring options. |
| - - ext_cur_wrd | number | false | Return the read content in real time. default 0. 0: Disable 1: Enable |
| - - gop_adjust | number | false | Increase or reduce the evaluation scores. The value range is between[-1,1] and the precision is 0.1 . Default value is 0, which means using original scores. If the value is between [0,1]. The larger the value is, the higher degree the score will be increased. If the value is between [-1,0], the smaller the value is, the higher degree the scores will be reduced. |
Stress, Rising tone, pause(optional)
- Symbols can be used to make tone, stress tone, rising tone and pause in sentences.
- Accents, ups and downs, and pauses are not counted in the total score.
| Type | Symbols | Sample | Description |
|---|---|---|---|
| Stress | (s:1) | Are(s:1) you ok? | "Are" is maked with stressed. |
| Rising tone | (t:1) | Are you ok(t:1)? | "Ok" is marked with rising tone. |
| Both Stress and rising tone | (s:1,t:1) | Are you ok(s:1,t:1)? | Word “ok” is marked as both stress and rising tone, use commas to separate marks. |
| Pause | (g:1) | Are you(g:1) ok? | Word “you” is marked with pause. |
Sample Code
{
"coreType": "en.sent.pron",
"refText": "I want to know the past of China.",
"accent": 1,
"rank": 100,
"voiced":1,
"attachAudioUrl": 1
"result": {
"details": {
"ext_cur_wrd": 1,
"gop_adjust":0.5
}
}
}
Real-time return result description
| Key | Type | Description | Recommendations |
|---|---|---|---|
| eof | int | Whether the final evaluation result0: Indicates that the result is returned in real time during the recording process;1: Indicates that the result is the final evaluation result after the recording is completed; | Suggest to display |
| result | object | Return result description | |
| - rec | string | During the evaluation process, the newly-recognized words will be returned to the read content in real time. | Suggest to display |
| - phnspeed | string | Current speaking rate (unit: phoneme). | For reference |
| - details | object | During the evaluation process, the score of each word of the read content is returned in real time. | |
| - - text | string | Words that are read. | Suggest to display |
| - - score | number | Read word score | Suggest to display |
Examples of real-time results
{
"sdk": {
"protocol": "websocket",
"version": 16777216,
"source": 4
},
"tokenId": "47e76381-****-****-****-********",
"result": {
"details": [
{
"text": "i",
"score": 78
}
],
"rec": "i",
"phnspeed": 454
},
"eof": 0,
"time": {
"callback": "2020-12-04 16:51:22:870",
"start": "2020-12-04 16:51:20:363",
"connect": "2020-12-04 16:51:20:311"
}
}
Example of final return result
- The result is returned using the JSON structure, Example
Final return result description
| 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 | Scoring result | |
| - wavetime | number | Audio duration(Unit: milliseconds) | For reference |
| - overall | number | Overall score. The default percentage system. | Suggest to display |
| - integrity | number | Score of integrity. | Suggest to display |
| - accuracy | number | Score of accuracy(pronunciation evaluation of the read part). | Suggest to display |
| - fluency | object | Fluency score details | |
| - - pause | number | Number of pauses. | Suggest to display |
| - - overall | number | Overall score of fluency. | Suggest to display |
| - - speed | number | Speech rate, which is the number of words read per minute. | Suggest to display |
| - details | array | Word-level superfluous reading, miss-reading, and wrong-reading detection and correction, and provide word-level scoring. | |
| - - accent | int | 0, 1, 2 or 3:
|
Suggest to display |
| - - is_err | number | Pronunciation type. 0: correct. 1: superfluous reading. 2: missing reading. 3: misread. |
Suggest to display |
| - - lab | string | The word in the sentence. For words that are read more, lab is marked as #. For missed words, lab marks them as words in the reference text. Words that are mispronounced, lab are marked as words in the reference text. |
Suggest to display |
| - - rec | string | Recognized words. The missed word rec is marked as #. Words that are read more, if the more read words are in refText, rec is marked as a more read word. If the word is not in refText, rec field is marked as UNK. The mispronounced word, if the mispronounced word is in refText, rec is marked as the mispronounced word. The mispronounced word, if the mispronounced word is not in refText, rec is marked as UNK. |
Suggest to display |
| - - score | number | Word pronunciation score. Words that are superfluous reading is scored as 0 if they are not in refText field(the rec field is marked as UNK). |
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 |
| - - stressref | number | 0 or 1: 0: Not marked to be stressed. 1: Marked to be stressed. |
Suggest to display |
| - - stressscore | number | 0 or 1:0: Not stressed in audio.1: Stressed in audio. stressscore=stressref, indicating that the stress pronunciation is consistent with the mark. | Suggest to display |
| - - toneref | number | 0 or 1: 0: Not marked to rising tone. 1: Marked to rising tone. |
Suggest to display |
| - - tonescore | number | 0 or 1: 0: Not reading with rising tone.1: Reading with rising tone. tonescore=toneref, indicating that the rising and falling tone is consistentwith the mark. | Suggest to display |
| - - pause_ref | number | 0 or 1:0: Not marked to pause.1: Marked to pause. | Suggest to display |
| - - pause_score | number | 0 or 1: 0: Reading without pause after the word.1: Reading with pause after the word. pause_score=pause_ref, indicating that the pause detection is consistent with the mark. | Suggest to display |
| - - indict | int | The word's pronunciation is in dictionary or generated by the engine. 0, 1 or 2: 0: The word is not in Chivox’s dictionary and engine failed to generate its pronunciation.1: The word is in Chivox’s dictionary. 2: The word is not in Chivox’s dictionary but the engine generates its pronunciation successfully. |
For reference |
| - - beginindex | number | The word first letter's index. If the value is -1, it means that this is a multi-read word. |
Suggest to display |
| - - endindex | number | The word last letter's index. If the value is -1, it means that this is a multi-read word. |
Suggest to display |
| - info | object | ||
| - - tipId | number | Audio quality For details, please refer to TipId field description |
For reference |
| - - tips | string | Error information1. "post proc failed";2. "fa decode failed!" 3. "empty or too short wav!" These errors may be that the audio was not recorded successfully or the engine did not detect the user's valid voice, which can 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.
