Score Text/Phoneme list

Run in Postman: Score a Phoneme list

With the phone list API, you can score a sequence of phonemes that make up any word or non-word.

Individual words, such as "Gotcha," which are American vernacular and not valid dictionary words, can be scored using the phoneme list API. The phoneme list uses a different url endpoint and expects the list of phonemes in Arpabet notation.

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/phone_list/v9/json

curl --location -g 'https://api.speechace.co/api/scoring/phone_list/v9/json?key={{speechacekey}}&dialect=en-us' \
--form 'phone_list="g|ao|ch|ah"' \
--form 'user_audio_file=@"gotcha.wav"'

Query Parameters

ParameterTypeDescription

key

String

API key issued by Speechace.

dialect

String

This is the dialect to be scored. Supported only for en-us and en-gb

user_id

String

Optional: A unique anonymized identifier for the end-user who spoke the audio.

Request Body

ParameterTypeDescription

phone_list

String

A phoneme list to score. For example: g|ao|ch|ah

user_audio_file

File

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

question_info

String

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

Response Example

The API response includes phone_score_list[] : a list of phonemes with it's own quality_score.

Each element within the phone_score_list[] also includes its own quality_score, its extent information indicating its start and end, and additional fields like the actual sound_most_like phone based on the speaker's attempt.

{
  "status": "success",
  "quota_remaining": -1,
  "word_score": {
    "word": "g|ao|ch|ah",
    "quality_score": 97,
    "phone_score_list": [
      {
        "phone": "g",
        "stress_level": null,
        "extent": [
          51,
          60
        ],
        "quality_score": 100,
        "sound_most_like": "g"
      },
      {
        "phone": "ao",
        "stress_level": null,
        "extent": [
          60,
          72
        ],
        "quality_score": 91,
        "sound_most_like": "ao"
      },
      {
        "phone": "ch",
        "stress_level": null,
        "extent": [
          72,
          87
        ],
        "quality_score": 100,
        "sound_most_like": "ch"
      },
      {
        "phone": "ah",
        "stress_level": null,
        "extent": [
          87,
          102
        ],
        "quality_score": 96,
        "sound_most_like": "ah"
      }
    ]
  },
  "version": "9.0"
}

Last updated