> For the complete documentation index, see [llms.txt](https://api-docs.speechace.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.speechace.com/api-reference/score-word.md).

# Score Word

{% hint style="info" %}
**Run In Postman:** [Score a Word](https://docs.speechace.com/#824b2e5a-4e68-4946-ab15-7c5bdf0e7084)
{% endhint %}

The **Score Word** API scores the pronunciation of a **single lexical unit** — whether that is a dictionary word, a letter name, a letter sound, a non-word, or a set of single-word choices. It applies scoring optimizations and model combinations tuned for utterances where the speaker produces just one item, so it is the recommended endpoint whenever your activity targets one word (or one target chosen from a few).

For scoring a phrase, sentence, or passage of connected speech, use Score Text instead.

### What you can score

Everything Score Word handles is expressed through the `word` parameter — as plain text, as an `arpa_mark` phonetic string, or as `\n`-separated targets for multiple choice. There is no separate endpoint per input type; the table below maps each kind of target to how you pass it.

| Input type                                                                        | Pass it as     | Example word value                                                |
| --------------------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------- |
| **Dictionary word**                                                               | Plain text     | `cat`                                                             |
| <p><strong>Letter name</strong><br><em>(the letter's spoken name)</em></p>        | Plain text     | `B`                                                               |
| <p><strong>Letter sound</strong><br><em>(the phoneme a letter makes)</em></p>     | `arpa_mark`    | `[b]{b ah0}` with `markup_language=arpa_mark`                     |
| <p><strong>Non-word</strong><br><em>(nonsense / custom word)</em></p>             | `arpa_mark`    | `[shuz\|zle]{sh ah1 \| z ah0 l}` with `markup_language=arpa_mark` |
| <p><strong>Multiple choice</strong><br><em>(several single-word targets)</em></p> | `\n`-separated | `cat\ndog`                                                        |

{% hint style="info" %}
**Letter name vs. letter sound.** A *letter name* is scored by passing the letter itself as text (`word=B`). A *letter sound* is the phoneme that letter represents — express it with `arpa_mark` (`[b]{b ah0}`). Both flow through the same `word` parameter documented below.

**Markup tip:** the `arpa_mark` examples above include syllable boundaries (`|`) and stress marks (`0`/`1`/`2`). Score Word treats both as optional, but including them improves scoring — we recommend always providing them.
{% endhint %}

### Request Format

The endpoint to use will depend on the [region](/getting-started/api-regions-and-endpoints.md) of your subscription. For example, for US West, the endpoint is <https://api.speechace.co>.

<mark style="color:$success;">`POST`</mark> [`https://api.speechace.co/api/scoring/word/v9/json`](https://api.speechace.co/api/scoring/word/v9/json)

### Headers

<table><thead><tr><th width="252.4296875">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr></tbody></table>

### Query Parameters

<table><thead><tr><th width="136">Parameter</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>key</td><td>String</td><td><p><strong>Required</strong></p><p><em>API</em> <a href="/getting-started/authentication.md"><em>key</em></a> <em>issued by Speechace.</em></p></td></tr><tr><td>dialect</td><td>String</td><td><p><strong>Optional</strong> <em>default = <code>en-us</code></em></p><p><em>Supported values are: <code>en-us</code>, <code>en-gb</code>, <code>es-es</code>, <code>es-mx</code>, <code>fr-fr</code>, <code>fr-ca</code></em></p></td></tr><tr><td>user_id</td><td>String</td><td><p><strong>Optional</strong></p><p><em>A unique anonymized identifier (generated by your applications) for the end-user who submitted the response.</em></p></td></tr></tbody></table>

### Request Body

<table><thead><tr><th width="175.2265625">Parameter</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>word</td><td>String</td><td><p><strong>Required.</strong> Max length: 300 characters.</p><p><em>Word to score. Can be expressed as one of:</em></p><ul><li><em>text: (e.g. "cat")</em></li><li><em>arpa_mark: (e.g. "[cat]{k ah1 t}")</em></li><li><em>Multiple Choice with '\n' as separator: (e.g. "cat\ndog")</em></li><li><em>Multiple choice with arpa_mark: (e.g. "[cat]{k ah1 t}\n[dog]{d ao1 g})</em><br></li></ul><p><em><strong>Note:</strong> arpa_mark and Multiple choice only supported with <code>en-us</code> and <code>en-gb</code> dialects.</em></p></td></tr><tr><td>user_audio_file</td><td>File</td><td><strong>Required.</strong> Max Duration: 30 seconds.<br><em>File with user audio (wav, mp3, m4a, webm, ogg, aiff)</em></td></tr><tr><td>markup_language</td><td>String</td><td><strong>Optional</strong><br><em>Supported values are: <code>arpa_mark</code></em><br><em>Pass this parameter when using markup language in the word parameter.</em><br><br><em><strong>Note:</strong> arpa_mark is only supported with <code>en-us</code> and <code>en-gb</code> dialects.</em></td></tr><tr><td>include_interference_metrics</td><td>String</td><td><p><strong>Optional</strong><br>Use <code>include_interference_metrics=1</code> to include interference metrics in the response. When set, the <code>interference_ratio</code> field is returned inside <code>word_score</code>.<br></p><p>See the <a href="/interpreting-results/detecting-speech-interference.md">Detecting Speech Interference guide</a> for how to interpret and use this field.<br><br><em><strong>Note:</strong></em> <code>include_interference_metrics</code> <em>is only supported with <code>en-us</code> and <code>en-gb</code> dialects.</em></p></td></tr></tbody></table>

### Request Examples

The below examples show different modes of calling the Score Word API with the responses:

<table><thead><tr><th width="163.21484375">Example</th><th width="282.44140625">Request Body Parameters</th><th>When to Use</th></tr></thead><tbody><tr><td>A. Score a word</td><td><code>word="cat"</code></td><td><em>When scoring a single word and you just want to accept Speechace lexicon for inferring phonetic makeup of the word.</em></td></tr><tr><td>B. Score a word with markup</td><td><code>word="[read]{r iy1 d}"</code><br><code>markup_language="arpa_mark"</code></td><td><em>When you wish to pass the exact expected phonetic markup for the word.</em><br><em>For example in this case you want the present tense of "read" rather than the possibility of present or past tense.</em></td></tr><tr><td>C. Score a word with MC</td><td><code>word="cat\ndog"</code></td><td><em>When you have multiple targets in your activity.</em><br><em>For example, you show 2 pictures of a dog and a cat and the learner speaks their favorite.</em></td></tr><tr><td>D. Score a word with MC and markup</td><td><code>word="[cat]{k ah1 t}\n[dog]{d ao1 g}"</code><br><code>markup_language="arpa_mark"</code></td><td><em>When you have multiple targets but you also wish to explicitly pass the exact phonetic markup for each target.</em></td></tr></tbody></table>

{% hint style="info" %}
You can Review the full arpa\_mark syntax [here](/reference-data/markup-language.md#markup-syntax).

**Note:** Score Word relaxes two arpa\_mark syntax constraints:

* Stress is optional (i.e. no 0,1,2 stress required on vowels)
* Syllable boundary is optional (i.e. no '|' required between word syllables)\
  \
  Speechace strongly recommends passing stress and syllable information for best scoring results.
  {% endhint %}

### Response Examples

Below are API response examples for each of the above cases: A, B, C, D.

{% tabs %}
{% tab title="A. word=" %}
{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
    "status": "success",
    "word_score": {
        "word": "cat",
        "quality_score": 98,
        "quality_class": "pass",
        "phone_score_list": [
            {
                "phone": "k",
                "stress_level": null,
                "extent": [
                    11,
                    17
                ],
                "quality_score": 92,
                "sound_most_like": "k"
            },
            {
                "phone": "ae",
                "stress_level": 1,
                "extent": [
                    17,
                    29
                ],
                "quality_score": 100,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "sound_most_like": "ae"
            },
            {
                "phone": "t",
                "stress_level": null,
                "extent": [
                    29,
                    47
                ],
                "quality_score": 100,
                "sound_most_like": "t"
            }
        ],
        "syllable_score_list": [
            {
                "phone_count": 3,
                "stress_level": 1,
                "letters": "cat",
                "quality_score": 97,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "extent": [
                    11,
                    47
                ]
            }
        ]
    },
    "version": "9.17"
}
```

{% endcode %}
{% endtab %}

{% tab title="B. word=" %}
{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
    "status": "success",
    "word_score": {
        "word": "read",
        "quality_score": 100,
        "quality_class": "pass",
        "phone_score_list": [
            {
                "phone": "r",
                "stress_level": null,
                "extent": [
                    5,
                    17
                ],
                "quality_score": 100,
                "sound_most_like": "r"
            },
            {
                "phone": "iy",
                "stress_level": 1,
                "extent": [
                    17,
                    29
                ],
                "quality_score": 98,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "sound_most_like": "iy"
            },
            {
                "phone": "d",
                "stress_level": null,
                "extent": [
                    29,
                    41
                ],
                "quality_score": 100,
                "sound_most_like": "d"
            }
        ],
        "syllable_score_list": [
            {
                "phone_count": 3,
                "stress_level": 1,
                "letters": "read",
                "quality_score": 99,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "extent": [
                    5,
                    41
                ]
            }
        ]
    },
    "version": "9.17"
}
```

{% endcode %}
{% endtab %}

{% tab title="C. word=" %}
{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
    "status": "success",
    "word_score": {
        "word": "cat",
        "quality_score": 98,
        "quality_class": "pass",
        "phone_score_list": [
            {
                "phone": "k",
                "stress_level": null,
                "extent": [
                    11,
                    17
                ],
                "quality_score": 92,
                "sound_most_like": "k"
            },
            {
                "phone": "ae",
                "stress_level": 1,
                "extent": [
                    17,
                    29
                ],
                "quality_score": 100,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "sound_most_like": "ae"
            },
            {
                "phone": "t",
                "stress_level": null,
                "extent": [
                    29,
                    47
                ],
                "quality_score": 100,
                "sound_most_like": "t"
            }
        ],
        "syllable_score_list": [
            {
                "phone_count": 3,
                "stress_level": 1,
                "letters": "cat",
                "quality_score": 97,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "extent": [
                    11,
                    47
                ]
            }
        ]
    },
    "version": "9.17"
}
```

{% endcode %}
{% endtab %}

{% tab title="D. word=" %}
{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
    "status": "success",
    "word_score": {
        "word": "cat",
        "quality_score": 98,
        "quality_class": "pass",
        "phone_score_list": [
            {
                "phone": "k",
                "stress_level": null,
                "extent": [
                    11,
                    17
                ],
                "quality_score": 92,
                "sound_most_like": "k"
            },
            {
                "phone": "ae",
                "stress_level": 1,
                "extent": [
                    17,
                    29
                ],
                "quality_score": 100,
                "stress_score": 100,
                "predicted_stress_level": 1,
                "sound_most_like": "ae"
            },
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response fields

The response JSON contains the following scores.

<table><thead><tr><th width="300">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>word_score.word</code></td><td>The target word. If Multiple Choice was used, this is the closest target to what the user spoke.</td></tr><tr><td><code>word_score.quality_score</code></td><td>The pronunciation score for the word (scale 0..100). See <a href="/interpreting-results/interpreting-quality-score.md">this guide</a> for interpreting the <code>quality_score</code>.</td></tr><tr><td><code>word_score.quality_class</code></td><td><code>pass</code> | <code>fail</code>. The classification for the word based on its <code>quality_score</code>. The threshold applied for <code>pass</code> is <code>quality_score ≥ 70</code>.</td></tr><tr><td><code>word_score.syllable_score_list</code></td><td>An array of syllables within the word, each with its <code>quality_score</code>, stress, and extent information.</td></tr><tr><td><code>word_score.phone_score_list</code></td><td>An array of phonemes within the word, each with its <code>quality_score</code>, stress, and extent information.</td></tr></tbody></table>

### Replacing Score Phone List

Score Word is the recommended way to score any single word built from a phoneme sequence, and is a complete replacement for the older Score Phone List endpoint — for both dictionary words and custom non-words.

Score Word uses [arpa\_mark](/reference-data/markup-language.md) to express an exact phonetic sequence, and (unlike Phone List) does not *require* stress notation or syllable boundaries — so converting an existing `phone_list` call is straightforward.

<table><thead><tr><th width="200">Example</th><th width="260">score phone_list syntax</th><th>score word syntax</th></tr></thead><tbody><tr><td>The word: <strong>gotcha</strong></td><td><code>phone_list="g|ao|ch|ah"</code></td><td><code>word="[gotcha]{g ao ch ah}"</code></td></tr><tr><td>The word: <strong>photographer</strong><br>* no stress or syllable boundaries</td><td><code>phone_list="f|ah|t|aa|g|r|ah|f|er"</code></td><td><code>word="[photographer]{f ah t aa g r ah f er}"</code></td></tr><tr><td>The word: <strong>photographer</strong><br>* with stress and syllable boundaries</td><td><code>phone_list="f|ah|t|aa|g|r|ah|f|er"</code></td><td><code>word="[pho|tog|ra|pher]{f ah0|t aa1 g|r ah0|f er0}"</code></td></tr></tbody></table>

{% hint style="info" %}
Although stress and syllable boundaries are optional, we recommend including them — as in the third example. They improve scoring, especially for longer multi-syllable words.
{% endhint %}
