/docs
cn.word.score
Kernel Description
Evaluate a single pinyin, feedback the total score and the scores of initial and final;
- Support whole-syllable
- Support initial and final evaluation
- Support difficulty adjustment
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| coreType | String | true | cn.word.score means Chinese pinyin Kernel |
| res | String | true | Resources For children groups, please configure "chn.wrd.G4.A2" For adult groups, please configure "chn.wrd.G4.A7" |
| refText | String | true | Reference text Use pinyin plus numbers to mark, support 1 Chinese character scoring; Marking rules: initial + final + tone, 1/2/3/4Corresponding to : ˉ ˊ ˇ ˋtone; final ü : mark with v, for example, "女" is marked with "nv3"; Support initial and final evaluation, please refer to List of initials and finals |
| rank | int | false | 4 or 100, Default value is 100, means full score is 100. |
| attachAudioUrl | number | false | Enable to return audio url or not.
|
| result | object | false | Result control parameters |
| - details | object | false | Detailed scoring options |
| - - gop_adjust | number | false | Increase or reduce the evaluation scores. value range[-1,-0.9, ... 0.9, 1]。 Default value is 0, which means using original scores. The passing parameter is a positive number to increase the scoring score. The larger the passing parameter, the more the score will be improved. Pass parameter is negative, reduce the scoring score, the smaller the pass parameter, the more the score will be reduced |
Sample Code
Sample1 Pinyin
{
"coreType": "cn.word.score",
"res": "chn.wrd.G4.A2",
"refText": "hao3",
"rank": 100,
"attachAudioUrl": 1
}
Sample2 Initial
{
"coreType": "cn.word.score",
"res": "chn.wrd.G4.A2",
"refText": "b",
"rank": 100,
"attachAudioUrl": 1
}
Sample3 Final
{
"coreType": "cn.word.score",
"res": "chn.wrd.G4.A2",
"refText": "a3",
"rank": 100,
"attachAudioUrl": 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 | Scoring result | |
| - wavetime | number | Audio duration (Unit:milliseconds) | For reference |
| - overall | number | Overall score | Suggest to display |
| - phn | number | Pronunciation score without tone | Suggest to display |
| - tone | number | Tone score | Suggest to display |
| - details | array | Detailed syllable score | |
| - - char | string | pinyin | For reference |
| - - overall | number | Syllable overall score: Integrated syllable pronunciation without tone(phn) and tone (tone) | Suggest to display |
| - - tonescore | number | Tone score | Suggest to display |
| - - phn | number | Pronunciation score without tone | Suggest to display |
| - - tone | number | Standard tone value (0~4) | Suggest to display |
| - - tonematch | number | Whether the user's pronunciation tone is consistent with the standard tone(children groups only)1: means consistent0: means not consistent | |
| - - confidence | array | Pronunciation tone confidence, a total of 5 digits, respectively indicate the probability of being pronounced as soft, one, two, three, and four tones. The tone with the largest number is the actual tone of the pronunciation. |
Suggest to display |
| - - phone | array | Syllable score results | |
| - - - char | string | Syllable | For reference |
| - - - score | number | Syllable score | For reference |
| - - 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 |
| - - dur | number | duration (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.
