ChivoxAI

/docs

en.choc.score

Kernel Description

Applicable question types:Oral choice questions, support single selection, multiple selection. The user needs to read the correct text and pronounce it correctly and completely.
Evaluation dimensions: overall score, pronunciation score, fluency score

Request Parameters

Parameters Type Required Description
coreType String true en.choc.score means multiple choice kernel
refText object true Reference answer
- lm object true
- - text String true Answer item, supports setting multiple answer items

Note:
1.Label the correct and incorrect types of answer by configuring 1 and 0 in the answer field;
2.Support setting word slot;
“lm”:[
{{
“text”: “Linda comes from {where}”,
“answer“: 1
}]
{where} is the word slot, which is marked with {}. The content referred to by where is configured through the following key fields.
The word slot only supports a single word, and up to 3 word slots can be set.
Please refer to sample code below for details
- key array false The keyword corresponding to word slot,it can be a word, a phrase, or a short sentence.
The answer field configuration 1 is correct keyword, and configuration 0 is wrong keyword.
All keywords must be read aloud, otherwise overall score is 0. Please refer to sample code 2 below for details
- least_hit_cnt int true The number of answers that were hit.

Single selection: set to 1;
Multiple selection: The number of answer read by user;

The default is the number of answer items marked answer 1 in the text field
accent int false Specify British or American pronunciation. 1, 2 or 3, Default value is 3.
  • 1. Accept British pronunciation.
  • 2: Accept American pronunciation.
  • 3: Accept both British and American pronunciation.
rank int false Default value is 100, 1~100 can be set
attachAudioUrl number false Enable to return audio url or not.
  • 0: Disable
  • 1: Enable

Sample Code 1

Single selection no word slot

{
    "coreType": "en.choc.score",
	"rank": 100,
	"refText":
	{
	  "least_hit_cnt": 1,
	  "lm": 
	  [
		{
			"answer": 1,
			"text": "Yes, Huawei is my favourite brand."
		},
		{
		    "answer": 0,
			"text": "No, it's free."
		},
		{
		    "answer": 0,
			"text": "No, some other brands please"
		}
	  ]
	},
	"attachAudioUrl": 1
}

Sample Code 2

Single selection set word slot

{
	"coreType": "en.choc.score",
	"rank": 100,
	"refText": 
	{
	    "least_hit_cnt": 1,
		"lm": 
		[{
			"answer": 1,
			"text": "Linda comes from {where}"
		}],
		"key": 
		[{
			"name": "where",
			"values": 
			[ {
					"answer": 1,
					"text": "Beijing"
			 },
			 {
					"answer": 0,
					"text": "London"
			 },
			 {
					"answer": 0,
					"text": "Washington D.C"
			 }
			]
		 }
		]
	},
	"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:
  • Chivox save audio for one week. Please save audio to your own server for long-term storage.
  • The domain name will be different for different access areas, and the actual return shall prevail.
For reference
result object Scoring result
- wavetime number Audio duration (Unit:milliseconds) For reference
- overall number Overall score Suggest to display
- conf array Confidence for each answer (0-100,integer) For reference
- fluency object Fluency score details.
- - 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
- info object
- - tipId number Audio quality
For details, please refer to TipId field description
For reference
- - tips string Error message prompt
When 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.

SDK, API, MCP and Function Calling documentation on this site.