Score Speech/Language Detection

Run in Postman: Language Scores

Request Format

The request parameters in the cURL code below are the same as in the Score Text/Open-ended scoring function. To detect the language following parameters can be used:

  1. detect_dialect = 1: This parameter is used to detect the dialect of the spoken language without impacting the user's test score. This approach is more lenient, allowing the user to proceed with their score intact even if the detected dialect doesn’t match the expected one. In this case, the API output will return the potential language in which the user provided a response.

  2. enforce_dialect = 1: This parameter is used to enforce the correct dialect, resulting in a hard error if the response is in an unexpected language. If the detected dialect is incorrect, the API will generate an error, and the developer can set the user's score to zero based on this error response.

curl --location -g 'https://api.speechace.co/api/scoring/speech/v9/json?key={{speechace_premiumkey}}&dialect=en-us' \
--form 'user_audio_file=@"kevin.m4a"' \
--form 'detect_dialect = 1'

Response Example

The following responses illustrate two scenarios: in the first case, the language code for the detected language/dialect is reported under the key detected_dialect, resulting in a warning for the user. In the second case, an incorrect dialect triggers an enforced error under the key detail_message, preventing further action.

{
    "status": "success",
    "quota_remaining": -1,
    "speech_score": {
        "transcript": "Ich liebe den Winterurlaub, weil ich die kalte Luft und den Schnee genieße.",
        "word_score_list": [....],
        "ielts_score": {...},
        "pte_score": {...},
        "speechace_score": {...},
        "toeic_score": {...},
        "cefr_score": {...},
        "fluency": {...},
        "detected_dialect": {
            "lang_id": "ge"
        },
        "asr_version": "0.4"
    },
    "saved_file_path": ".../d3b09f662d0eadd8d91266ecfe1b211f.mp3",
    "version": "9.9"
}

Last updated