Score Text/Pronunciation

Run in Postman: Score a word or sentence

Request Format

The endpoint that is to be used will depend on the region of your subscription. For example, for US West, the endpoint is https://api.speechace.co.

POST https://api.speechace.co/api/scoring/text/v9/json

curl --location -g 'https://api.speechace.co/api/scoring/text/v9/json?key={{speechacekey}}&dialect=en-us \
--form 'text="apple"' \
--form 'user_audio_file=@"apple.wav"'

Query Parameters

Parameter
Type
Description

key

String

API key issued by Speechace.

dialect

String

This is the dialect in which the speaker will be assessed.

Note: Not all features of the score/text API support every dialect. Applicable dialects will be explicitly mentioned.

user_id

String

Optional: A unique anonymized identifier (generated by your application) for the end-user who spoke the audio.

Request Body

Parameter
Type
Description

text

String

A word, phrase, or sentence to score. This should be in the dialect chosen. For example, if fr-fr is the chosen dialect, then the word can be Salut.

user_audio_file

File

file with user audio (wav, mp3, m4a, webm, ogg, aiff)

question_info

String

Optional: A unique identifier (generated by your application) for the activity or question this user audio is answering.

no_mc

String

Optional: no_mc = 1 to indicate the text field contains multiple lines.

include_fluency

String

Optional: include_fluency= 1 to include fluency scoring in the response. See this guide for how to use this field.

include_intonation

String

Optional: include_intonation= 1 to include intonation and stress-level scores. See this guide for how to use this field.

markup_language

String

Optional: markup_language = arpa_mark This key signifies that the text parameter may contain markup annotations.

See this guide for how to use this field.

include_unknown_words

String

Optional: include_unknown_words = 1

This key instructs Speechace to automatically infer the expected pronunciation for unknown terms, such as names, places, and other specific terminology. This ensures accurate feedback even for unfamiliar words.

detect_dialect

String

Optional field: Possible values - 0 | 1

1: will apply language detection and warn if the majority of the response language is different from the intended scoring dialect.

enforce_dialect

String

Optional field: Possible values - 0 | 1

1: will apply language detection and error if the majority of the response language is different from the intended scoring dialect.

Setting enforce_dialect=1 automatically sets detect_dialect=1.

Response Example

{
  "status": "success",
  "quota_remaining": -1,
  "text_score": {
    "text": "apple",
    "word_score_list": [
      {
        "word": "apple",
        "quality_score": 100,
        "phone_score_list": [
          {
            "phone": "ae",
            "stress_level": 1,
            "extent": [
              12,
              27
            ],
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 2,
            "word_extent": [
              0,
              1
            ],
            "sound_most_like": "ae"
          },
          {
            "phone": "p",
            "stress_level": null,
            "extent": [
              27,
              39
            ],
            "quality_score": 100,
            "word_extent": [
              2,
              3
            ],
            "sound_most_like": "p"
          },
          {
            "phone": "ah",
            "stress_level": 0,
            "extent": [
              39,
              42
            ],
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 0,
            "word_extent": [
              3,
              4
            ],
            "sound_most_like": "ah"
          },
          {
            "phone": "l",
            "stress_level": null,
            "extent": [
              42,
              54
            ],
            "quality_score": 98.5,
            "word_extent": [
              3,
              4
            ],
            "sound_most_like": "l"
          }
        ],
        "syllable_score_list": [
          {
            "phone_count": 1,
            "stress_level": 1,
            "letters": "ap",
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 2,
            "extent": [
              12,
              27
            ]
          },
          {
            "phone_count": 3,
            "stress_level": 0,
            "letters": "ple",
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 0,
            "extent": [
              27,
              54
            ]
          }
        ]
      }
    ],
    "ielts_score": {
      "pronunciation": 9
    },
    "pte_score": {
      "pronunciation": 90
    },
    "speechace_score": {
      "pronunciation": 100
    },
    "toeic_score": {
      "pronunciation": 200
    },
    "cefr_score": {
      "pronunciation": "C2"
    }
  },
  "version": "9.3"
}

Last updated