/docs
cn.word.raw
Kernel Description
Evaluate a single Chinese character, feedback the total score and the scores of initial and final;
- Support whole-syllable
- Support difficulty adjustment
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| coreType | String | true | cn.word.raw means Chinese single character evaluation |
| 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 | The evaluated Chinese character only supports 1 Chinese character, and supports customizing its pinyin |
| 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 | |
| - - 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 Chinese character
{
"coreType": "cn.word.raw",
"res":"chn.wrd.G4.A2",
"refText": "好",
"rank": 100,
"attachAudioUrl": 1
}
Sample2 Customize the pinyin of a single Chinese character
{
"coreType": "cn.word.raw",
"res":"chn.wrd.G4.A2",
"refText": "X(cha1)",
"rank": 100,
"attachAudioUrl": 1
}
Sample3 Customize non-single Chinese pinyin
{
"coreType": "cn.word.raw",
"res":"chn.wrd.G4.A2",
"refText": {
"text": "10087",
"prons": [
{
"10087": "yao1 ling2 ling2 ba1 qi1"
}
]
},
"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 | |
| - - 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 |
| - - chn_char | string | Chinese character | Suggest to display |
| - - char | string | Pinyin | For reference |
| - - phone | array | Syllable score results | |
| - - - char | string | Syllable | For reference |
| - - - score | number | Syllable score | For reference |
| - - 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 |
| - - 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 toTipId 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.
