For the complete documentation index, see llms.txt. This page is also available as Markdown.

Score Word

Run In Postman: Score a Word

The Score Word API is optimal for scoring pronunciation of a single word. It supports scoring optimizations and model combinations targeted on utterances where the speaker is pronouncing a single word.

A word can be a dictionary word, a custom word (aka non-word, non-sense word) defined with markup, a Multiple Choice (MC) combination where each target is a single word.

Request Format

The endpoint to use 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/word/v9/json

Headers

Name
Value

Content-Type

application/json

Query Parameters

Parameter
Type
Description

key

String

Required

API key issued by Speechace.

dialect

String

Optional default = en-us

Supported values are: en-us, en-gb, es-es, es-mx, fr-fr, fr-ca

user_id

String

Optional

A unique anonymized identifier (generated by your applications) for the end-user who submitted the response.

Request Body

Parameter
Type
Description

word

String

Required. Max length: 300 characters.

Word to score. Can be expressed as one of:

  • text: (e.g. "cat")

  • arpa_mark: (e.g. "[cat]{k ah1 t}")

  • Multiple Choice with '\n' as separator: (e.g. "cat\ndog")

  • Multiple choice with arpa_mark: (e.g. "[cat]{k ah1 t}\n[dog]{d ao1 g})

Note: arpa_mark and Multiple choice only supported with en-us and en-gb dialects.

user_audio_file

File

Required. Max Duration: 30 seconds. File with user audio (wav, mp3, m4a, webm, ogg, aiff)

markup_language

String

Optional Supported values are: arpa_mark Pass this parameter when using markup language in the word parameter. Note: arpa_mark is only supported with en-us and en-gb dialects.

include_interference_metrics

String

Optional Use include_interference_metrics=1 to include interference metrics in the response. When set, the interference_ratio field is returned inside word_score.

See the Detecting Speech Interference guide for how to interpret and use this field. Note: include_interference_metrics is only supported with en-us and en-gb dialects.

Request Examples

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

Example
Request Body Parameters
When to Use

A. Score a word

word="cat"

When scoring a single word and you just want to accept Speechace lexicon for inferring phonetic makeup of the word.

B. Score a word with markup

word="[read]{r iy1 d}" markup_language="arpa_mark"

When you wish to pass the exact expected phonetic markup for the word. For example in this case you want the present tense of "read" rather than the possibility of present or past tense.

C. Score a word with MC

word="cat\ndog"

When you have multiple targets in your activity. For example, you show 2 pictures of a dog and a cat and the learner speaks their favorite.

D. Score a word with MC and markup

word="[cat]{k ah1 t}\n[dog]{d ao1 g}" markup_language="arpa_mark"

When you have multiple targets but you also wish to explicitly pass the exact phonetic markup for each target.

You can Review the full arpa_mark syntax here.

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.

Response Examples

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

Last updated