Children's words

Updated at:

This document describes the speech evaluation technology for word repetition tasks. This technology is designed for developers and is suitable for evaluating the pronunciation of children under 12.

Task description

  • Evaluates English words and phrases.

  • Supports scoring based on custom pronunciations, syllable stress detection, and differentiation between British and American accents.

  • Feedback dimensions include the total word score, stress evaluation, and phoneme scores.

Evaluation request parameters

Field

Type

Optional

Description

coreType

string

Required

en.word_kid.score indicates English word evaluation for children.

refText

string

Required

The reference text for scoring. Note: Specify external pronunciations in two ways:
1. directory(z:d ih - 'r eh k - tr ih): The phonemes follow the internal phoneme specifications of the DPI engine.
2. directory(p:dəˈrektəri): Specifies the pronunciation using the original phonemes. If the original phonemes correspond to multiple standards, the processing priority is IP88 > KK > IP66. For more information, see Text symbol description.

rank

int

Optional

The scoring scale. You can set this value to any integer. The final score is rescaled based on a 100-point scale.

precision

double

Optional

The scoring precision. Valid values are 0.1, 0.5, and 1. The default value is 1. If you set this parameter to a value other than 0.1 or 0.5, the system uses 1.

attachAudioUrl

int

Optional

Specifies whether to return the audio URL in the evaluation result.
0: Does not return the URL.
1: Returns the URL.

typeThres

int

Optional

The scoring strictness. A higher value has less impact on the score. Valid values:1: Strict2: Loose3: Very strict4: Very loose0: Default. This feature is disabled.

accent

string

Optional

Specifies British or American English for scoring. By default, this feature is disabled, and the DPI engine intelligently determines the accent based on the user's pronunciation.
Set "accent" to "en" to specify British English evaluation.
Set "accent" to "am" to specify American English evaluation.

Parameter example

{
    "coreType":"en.word_kid.score",
    "refText":"egg",
    "rank":100,
    "attachAudioUrl":1,
    "accent":"en"
}

Sample response

{
    "tokenId": "6114e85388bf5b00000a0001",
    "applicationId": "aXXX",            //  The provided appkey
    "audioUrl": "http:\/\/files.cloud.ssapi.cn:8080\/a148\/11ebfb4ecda877958771a148m2611197",  // User audio download URL
    "connect": {   // Internal parameter. For internal use only.
        "param": {
            "app": {
                "timestamp": "1628760147",
                "applicationId": "aXXX",
                "sig": "5f82347d335449cc9aa053a4f2f29820f54bbd2f"
            },
            "sdk": {
                "os": "6.2(9200)1",
                "product": "",
                "source": 7,
                "protocol": 1,
                "os_version": "6.2(9200)",
                "arch": "586",
                "version": 16778752
            }
        },
        "cmd": "connect"
    },
    "params": {
        "app": {
            "timestamp": "1628760147",
            "userId": "ssound_text",
            "sig": "5f82347d335449cc9aa053a4f2f29820f54bbd2f",
            "connect_id": "6114e85388bf5b00000c0002",
            "clientId": "",
            "applicationId": "a148"
        },
        "audio":{                    // Audio format parameters for the scoring request
            "sampleRate":16000,  // Sample rate
            "channel":1,    // Sound channel. 1 indicates mono, and 2 indicates stereo. Evaluation supports only mono.
            "sampleBytes":2,
            "audioType":"ogg"  // Audio type
        },
        "request": {        // Parameter node for the scoring request
            "request_id": "6114e85388bf5b00000b0001",
            "accent": "en",    // This field is returned only if the accent parameter is not configured in the request.
            "rank": 100,                 // The scoring scale. The default value is 100. You can set this to any integer. The final score is rescaled based on a 100-point scale.
            "attachAudioUrl": 1,            // Specifies whether to return the audio URL in the evaluation result. 0: No. 1: Yes.
            "tokenId": "6114e85388bf5b00000a0001",
            "refText": "egg",                       // Text content
            "coreType": "en.word_kid.score"    // Task type
        }
    },
    "recordId": "11ebfb4ecda877958771a148m2611197", // The unique ID of the data in the cloud. Save this to your product database for troubleshooting.
    "refText": "egg",                              // Text content
    "dtLastResponse": "2021-08-12 17:22:27:884",         // Data response timestamp
    "cloud_platform": {
        "origin_audio_length": 7807
    },
    "result": {
        "pron": 98,
        "forceout": 0,
        "precision": 1,
        "systime": 2104,
        "res": "eng.wrd_kid.online.0.2",
        "version": "0.0.80.2021.7.24.00:01:28",
        "info": {
            "tipId": 10004,
            "clip": 0,
            "snr": 30.070004,
            "volume": 77
        },
        "rank": 100,
        "delaytime": 20,             // The time elapsed on the cloud from the end of the audio feed to result acquisition, in ms.
        "wavetime": 1990,          // Duration of the audio file
        "details": [
            {
                "stress": [
                    {
                        "ref": 0,
                        "score": 1,
                        "char": "eh_g"
                    }
                ],
                "char": "egg",
                "dur": 520,         // Word pronunciation duration, in ms.
                "score": 98,       // Pronunciation score
                "phone": [        // Phoneme combination of the word
                    {
                        "char": "e",      // The returned phonemes are not international phonemes. If your product needs to use them, convert them to international phonemes.
                        "score": 96,     // Phoneme score
                        "end": 1460,
                        "start": 1220
                    },
                    {
                        "char": "g",
                        "score": 100,
                        "end": 1740,
                        "start": 1460
                    }
                ],
                "end": 1740,
                "start": 1220
            }
        ],
        "pretime": 23,   // The time taken by the cloud to call the Start interface, in ms.
        "overall": 98
    },
    "eof": 1
}

Response description

Key

Type

Description

Suggestion

recordId

string

The unique ID of the audio file.

For reference

audioUrl

string

The download URL for the user's audio.
Audio files are stored for about 20 days by default. For long-term storage, download the files to your own server.
The domain name varies by access region and is subject to the actual returned value.

For reference

tokenId

string

The unique ID of the user request.

For reference

applicationId

string

Authorized account and your evaluation AppKey

Internal parameter

dtLastResponse

string

The timestamp of the cloud response.

Internal parameter

eof

int

0: The response is not complete, and more results will follow. 1: All results for this evaluation have been returned.

Internal parameter

refText

string

The input text for evaluation.

For reference

params

object

Echoes the evaluation request parameters passed in by the client.

- app

object

- - applicationId

string

The authorized account, which is the user's AppKey.

- - userId

string

The user ID.

- - timestamp

string

The start time.

- - sig

string

The verification code.

- request

object

The node for the scoring request parameter settings.

- audio

object

The node for the audio parameter settings in the scoring request.

result

object

The evaluation result node.

- version

string

The version of the DPI engine, including the release date.

Internal parameter

- rank

int

The scoring scale.

Internal parameter

- precision

float

The scoring precision.

Internal parameter

- res

string

The name of the resource used for evaluating this task type.

Internal parameter

- forceout

int

Internal parameter

- pretime

int

The time taken by the cloud to call the Start interface, in ms.

Internal parameter

- systime

int

The total time taken for the entire evaluation process, in ms.

Internal parameter

- delaytime

int

The time elapsed on the cloud from the end of the audio feed to result acquisition, in ms.

Internal parameter

- wavetime

int

The audio duration, in ms.

For reference

- overall

float

The overall score.

Recommended field

- pron

float

The pronunciation score.

Internal parameter

- details

array

- - start

int

The start time of the word in the audio, in ms.

For reference

- - end

int

The end time of the word in the audio, in ms.

For reference

- - dur

int

The pronunciation duration of the word, in ms.

For reference

- - char

string

The normalized word text.

For reference

- - score

int

The word score.

For reference

- - fake_pron

int

This field is returned only if the word is not in the dictionary (out-of-vocabulary). To evaluate out-of-vocabulary words, pass the phonemes using the refText parameter.

- - dp_type

int

Indicates normal reading (the dp_type field is not returned), omission (1), or repetition (2).
Normal: This field is not returned. Omission: dp_type is 1. Repetition: dp_type is 2.

- - accent

string

This field is not returned if the accent parameter is configured in the request. Otherwise, the field is returned, for example, "accent":"ea".

- - stress

array

Stress pronunciation.

- - - char

string

Phoneme.

For reference

- - - ref

int

Indicates whether the current syllable requires stress.
1: Stress is required. 0: Stress is not required.

- - - score

int

Stress feedback (0 or 1).

- - phone

array

Phoneme-level scoring results. For more information, see Phoneme mapping table.

- - - char

string

The phoneme. If the accent parameter is set in the request, this field contains standard British or American English phonemes. Otherwise, it contains internal mapped phonemes.

For reference

- - - score

int

The phoneme score (0-100).

For reference

- - - phid

int

The position of the phoneme in the word's phonetic transcription.

This field is returned only if phdet is set.

- - - pherr

int

Detects if there is an error in the phoneme (0 or 1).

This field is returned only if phdet is set.

- - - ph2alpha

string

The letter corresponding to the phoneme.

This field is returned only if phdet is set.

- realtime_details

array

Real-time feedback information.

-- char

string

Word.

For reference

-- dp_type

int

0: Normal reading. 1: Omission or not read. 2: Repetition.

For reference

- info

object

- - snr

float

The signal-to-noise ratio (SNR). A higher value indicates clearer audio. Range: 0 to 40 dB. If this parameter affects the score, a corresponding tipId value is set.

For reference

- - clip

float

The audio volume is too high, causing clipping. Range: 0 to 1. If this parameter affects the score, a corresponding tipId value is set.

Internal parameter

- - volume

int

The recording volume. Range: 0 to 180 dB.

For reference

- - tipId

int

Audio quality.

Recommended field

For more information, see tipId message description.

Suggestions for displaying evaluation results

Dimension

Description

Details

overall

Overall score

The overall evaluation of the word.

pron

Pronunciation score

details.syllable.score

Syllable score

The evaluation of a specific syllable's pronunciation in the word. Check if the field is empty before retrieving the value.

details.stress.score

Word stress score

The evaluation of a specific stressed pronunciation in the word. Check if the field is empty before retrieving the value.

details.phone.score

Phoneme score

The evaluation of a specific phoneme's pronunciation in the word. Check if the field is empty before retrieving the value.

details.dp_type

Word insertion or omission

Indicates whether the word was repeated or omitted. See the response description for the corresponding task type.

details.fake_pron

Voice Spoofing

Indicates whether the word is in the dictionary. If not, a pronunciation is predicted for the word.

Response for a failed evaluation

  • If the result structure in the response is empty, the evaluation failed.

  • You can retrieve the `errId` and `error` from the response. Your product can then use the corresponding error code for further processing.

Error codes