Recitation

Updated at:

This document provides the technical specifications for the English recitation evaluation topic type, which developers can use for product feature integration.

Description

  • This feature evaluates a user's recitation by comparing their pronunciation to the reference text.

  • The feedback includes an overall score, a score for each word, a fluency score, an integrity score, and a URL for the user's audio.

Evaluation request parameters

Field

Type

Optional

Description

coreType

String

Required

en.recite.score indicates the English recitation evaluation type.

refText

String

Required

The text to be recited.

symbol

int

Optional

Specifies whether to include punctuation in the results. Set to 0 or 1. The default is 0, which means punctuation is not returned.

feedback

int

Optional

Specifies whether to return recitation content in real time. Set to 0 or 1. The default is 0, which indicates non-real-time mode.

attachAudioUrl

int

Optional

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

Parameter example

{
    "coreType":"en.recite.score",
    "feedback":1,
    "refText":"Rain is falling all around, It falls on field and tree, It rains on the umbrella here, And on the ships at sea"
}

Sample response

{
    "request_id":"26efa3e64c0c11ecb9d8f348945006b1",
    "applicationId":"a148",
    "dtLastResponse":"2021-11-23 11:19:34:381",
    "connect":Object{...},
    "params":{
        "app":Object{...},
        "audio":Object{...},
        "request":{
            "request_id":"26efa3e64c0c11ecb9d8f348945006b1",
            "refText":"Rain is falling all around, It falls on field and tree, It rains on the umbrella here, And on the ships at sea",
            "coreType":"en.recite.score"
        }
    },
    "recordId":"11ec4c0c2768b6aa8576a1480691312f",
    "refText":"Rain is falling all around, It falls on field and tree, It rains on the umbrella here, And on the ships at sea",
    "eof":1,
    "result":{
        "overall":78,
        "wavetime":11700,
        "precision":1,
        "version":"0.0.80.2021.11.22.14:14:57",
        "systime":11756,
        "res":"eng.recite.mfcc.0.1",
        "details":[
            {
                "char":"Rain",
                "dur":420,
                "score":99,
                "end":660,
                "start":240
            },
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            {
                "dp_type":1,
                "char":"It",
                "dur":0,
                "score":0,
                "end":0,
                "start":0
            },
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...},
            Object{...}
        ],
        "delaytime":68,
        "info":{
            "tipId":0,
            "clip":0,
            "snr":10.773011,
            "volume":86
        },
        "integrity":87,
        "rank":100,
        "rhythm":0,
        "fluency":91,
        "pretime":1126,
        "pron":75
    },
    "cloud_platform":Object{...}
}

Response description

Key

Type

Description

Recommendations

tokenId

string

The unique identifier for the user request.

For reference.

applicationId

string

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

Internal parameter.

audioUrl

string

The download URL for the user's audio file.
Audio files are stored for about 20 days by default. To store them longer, download them to your own server.
The domain name varies based on the access region. The returned URL is the one to use.

recordId

string

The unique identifier for the audio file.

refText

string

The text to be recited.

dtLastResponse

string

The timestamp of the cloud response.

Internal parameter.

eof

int

Internal parameter.

params

object

Echoes the evaluation request parameters sent by the client.

- app

object

- - applicationId

string

The authorized account.

- - userId

string

The user identifier for your product. This can be a custom string. Use a unique userId for each user to make troubleshooting easier.

- - timestamp

string

The start time.

- - sig

string

The verification code.

- request

object

- - coreType

string

The engine to use.

- - tokenId

string

The unique identifier for the user request.

- - refText

string

The text to be recited.

- - attachAudioUrl

int

Specifies whether the scoring result includes the audio URL.

- audio

object

- - sampleRate

int

The sample rate.

- - channel

int

The sound channel.

- - sampleBytes

int

The number of bytes per sample. Supports single-byte and double-byte.

- - audioType

string

The audio format.

result

object

The evaluation result.

- overall

float

The overall score.

Internal parameter.

- systime

int

The total time consumed by the entire evaluation process, in ms.

- res

string

The name of the resource used for this evaluation type.

Internal parameter.

-fluency

object

Fluency details.

-version

string

The engine version, including the release date.

- integrity

float

The integrity score.

Recommended field.

- pretime

int

The time consumed by the cloud to call the Start API, in ms.

- pron

float

The pronunciation score.

Internal parameter.

-delaytime

int

The time from when the cloud finishes feeding the audio to when the result is obtained, in ms.

Internal parameter.

-wavetime

int

The duration of the audio.

For reference.

- info

object

- - snr

float

The signal-to-noise ratio (SNR).

For reference.

- - clip

float

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

Internal parameter.

- - tipId

int

Audio quality.

Recommended field.

-- volume

int

The recording volume. The range is from 0 to 180 dB.

For reference.

- details

array

Detailed scores for each word in the final result.

Recommended field.

- - score

float

The pronunciation score for the word.

- - char

string

Word

- - dp_type

int

Over-reads and missed reads

0: Normal pronunciation. This is usually not displayed, but is always displayed in real-time feedback mode. 1: The word was omitted. 2: The word was repeated.

- - end

int

The end time of a phoneme in milliseconds (ms).

- - start

int

The start time of the phoneme, in milliseconds (ms).

Response description

Dimension

Description

Details

overall

Overall score

Overall rating.

pron

Pronunciation score

fluency

Overall fluency score

integrity

Integrity score

Response for a failed evaluation

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

  • The response contains an errId and an error message. You can use the error code to determine the next steps for your product.

Error codes