Pronunciation API Documentation

Integrate pronunciation scoring into your application with our REST API

For AI agents and coding assistants: this reference as Markdown (indexed in llms.txt), plus the OpenAPI schema and Swagger UI to try the endpoint with your key.

Authentication

Authenticate your requests using an API key in the Authorization header:

Authorization: Bearer lx_your_api_key_here

⚠️ Keep your API key secure: Never expose your API key in client-side code or public repositories.

Endpoint Details

🔬 Syllable-Level Precision

The V4 API delivers the deepest pronunciation analysis available: every word is broken down to individual syllables with IPA transcription, millisecond timing and, for Chinese and Japanese, tone or pitch accent, across 22 languages.

Moving from v3

v3 (/api/pronunciation/v3/check) is deprecated and will be switched off on 1 March 2027. To move, change the path to /v4/check. Three differences: language_code is required (v3 defaulted to ja), an exhausted monthly quota returns 402 instead of 429 (429 now only means rate-limited), and syllables no longer carry pitch (use prosody). The SDKs use v4 from version 0.5.0.

POST/api/pronunciation/v4/check

Syllable-level pronunciation analysis with 22-language support

✨ Operating Modes:

  • Known text mode: Provide sentence parameter → Scores pronunciation syllable-by-syllable against expected text
  • Just Talk mode: Omit sentence parameter → Whisper AI transcribes your speech first, then scores pronunciation

Request Parameters

ParameterTypeRequiredDescription
speechdatafileYesAudio file (WAV, MP3, M4A, OGG, FLAC, WEBM). Max 10 MiB and 60 seconds; longer recordings are rejected with status code 400.
sentencestringNoExpected text to compare against. If omitted, Whisper transcribes speech first ("Just Talk" mode).
language_codestringYesLanguage code, one of the 22 codes listed below. Required.

💡 Send compressed audio

Encode client-side to MP3, Opus/WebM or AAC before uploading. A 10-second utterance is roughly 320 KB as 16 kHz mono WAV but under 40 KB as 64 kbps Opus — the same score, a fraction of the upload time. Uploads over 10 MiB are rejected with status code 413.

V3 Code Example

lingolix (PyPI) · @lingolix/sdk (npm)

you should set the API key as an environment variable:

export LINGOLIX_API_KEY=your_api_key_here

# pip install lingolix  (or: uv add lingolix)
from lingolix import Lingolix, QuotaExceededError

# WARNING: Keep API keys server-side only! Never expose in client-side code.
# Lingolix() reads $LINGOLIX_API_KEY. AsyncLingolix is the async twin.
with Lingolix() as client:
    try:
        # Known text mode
        r = client.check("audio.wav", sentence="Guten Morgen", language="de")

        # Just Talk mode (sentence omitted)
        # r = client.check("audio.wav", language="de")

        print(r.overall, r.accuracy, r.fluency, r.speaking_rate)
        for word in r.words:
            print("❌" if word.is_error else "✅", word.text, round(word.accuracy, 2))
            for s in word.syllables:
                # zh / ja also have s.reading (pinyin / romaji) and s.prosody (tone / pitch accent)
                print("  ", s.text, s.expected_ipa, "→", s.detected_ipa, round(s.accuracy, 2))
    except QuotaExceededError as e:
        print(f"{e.plan} plan is out of minutes — upgrade at {e.upgrade_url}")

Response Format

Each word contains a syllables array with per-syllable IPA and timing.

{
  "text": "Guten Morgen",
  "overall": 0.81,
  "accuracy": 0.78,
  "fluency": 1,
  "completeness": 1,
  "speaking_rate": 4.4,
  "target_speaking_rate": 3,
  "model_version": "2026-11-26",
  "words": [
    {
      "text": "Guten",
      "syllables": [
        {
          "text": "Gu",
          "expected_ipa": "ɡuː",
          "detected_ipa": "ɡuː",
          "accuracy": 1,
          "completeness": 1,
          "duration_ms": 200,
          "start_ms": 300,
          "end_ms": 500,
          "is_missing": false,
          "is_extra": false
        },
        {
          "text": "ten",
          "expected_ipa": "tn̩",
          "detected_ipa": "tn̩",
          "accuracy": 1,
          "completeness": 1,
          "duration_ms": 200,
          "start_ms": 520,
          "end_ms": 720,
          "is_missing": false,
          "is_extra": false
        }
      ],
      "accuracy": 1,
      "completeness": 1,
      "start_ms": 300,
      "end_ms": 720,
      "char_start": 0,
      "char_end": 5,
      "is_error": false,
      "hesitation_ms": null
    },
    {
      "text": "Morgen",
      "syllables": [
        {
          "text": "Mor",
          "expected_ipa": "mɔʁ",
          "detected_ipa": "ma",
          "accuracy": 0.33,
          "completeness": 0.67,
          "duration_ms": 200,
          "start_ms": 760,
          "end_ms": 960,
          "is_missing": false,
          "is_extra": false
        },
        {
          "text": "gen",
          "expected_ipa": "ɡn̩",
          "detected_ipa": "ɡn̩",
          "accuracy": 1,
          "completeness": 1,
          "duration_ms": 220,
          "start_ms": 980,
          "end_ms": 1200,
          "is_missing": false,
          "is_extra": false
        }
      ],
      "accuracy": 0.42,
      "completeness": 1,
      "start_ms": 760,
      "end_ms": 1200,
      "char_start": 6,
      "char_end": 12,
      "is_error": true,
      "hesitation_ms": null
    }
  ]
}

Result Fields

Show overall as the score; accuracy and fluency explain it, and the words and syllables show where.

FieldTypeDescription
textstringThe expected sentence, or the transcript in Just Talk mode
overallnumberThe score to show (0.0 – 1.0): accuracy and fluency weighted as human raters weigh them. Always present; equals accuracy when fluency is null
accuracynumberHow well the sounds were pronounced (0.0 – 1.0)
fluencynumber | nullPace and pauses (0.0 – 1.0): full credit from target_speaking_rate on, less for each hesitation. null when the utterance is too short to time (under 4 syllables)
completenessnumberFraction of the expected utterance that was said
speaking_ratenumberSyllables (Japanese: morae) per second, from the first syllable's start to the last's
target_speaking_ratenumber | nullPace from which fluency gets full credit, in the same unit: 60% of a typical native pace for the language, so learners have room
model_versionstring | nullWhich model and scoring produced these numbers, e.g. "2026-10". It changes when an update shifts scores, so you can tell results from different versions apart in stored history
assessablebooleanfalse when the recording can't be graded: silence or noise, or someone saying something else (another text or language). The scores are still computed but mean little; ask for a new recording instead of showing errors
reason"no_speech" | "noisy" | "mismatch" | nullWhy assessable is false: "no_speech" (silence, noise, music), "noisy" (speech buried in noise) or "mismatch" (a different text or language). null while assessable is true. More values may be added
wordsWord[]Per-word results, see Word Fields

Word Fields

FieldTypeDescription
textstringWord text
accuracynumberHow well the word's sounds were pronounced, judged by its weakest sound (0.0 – 1.0)
completenessnumberFraction of the word's syllables detected
start_msnumberStart offset in milliseconds
end_msnumberEnd offset in milliseconds
char_startintegerCharacter index of this word in the response's text field. -1 for Japanese and for extra words the user said that weren't in the expected text
char_endintegerCharacter index (exclusive) where this word ends in the response's text field. -1 under the same conditions as char_start
is_scoredbooleanfalse when the word couldn't be scored (no reference pronunciation); its accuracy is then not a verdict
is_errorbooleanOur verdict: true if the word was said wrong (left out, extra sounds, or a sound the model is confident was not the expected one). Tuned to avoid false alarms; mark errors with this and use accuracy as the grade. False for unscored words
hesitation_msnumber | nullPause before or inside this word, in milliseconds beyond the speaker's usual gap; null if none. Pauses at punctuation never count
readingstring | nullJapanese: Hepburn romaji with macrons ("tōkyō"); null in other languages
syllablesSyllable[]Per-syllable results, see Syllable Fields

Syllable Fields

FieldTypeDescription
textstringSyllable text (e.g. "ni")
expected_ipastringExpected IPA transcription
detected_ipastringDetected IPA from audio
accuracynumberPhoneme-level accuracy (0.0 – 1.0)
completenessnumberFraction of expected phonemes detected
duration_msnumberSyllable duration in milliseconds
start_msnumberStart offset in milliseconds
end_msnumberEnd offset in milliseconds
is_missingbooleantrue if the user skipped this syllable
is_extrabooleantrue if the user said something not in target
is_scoredbooleanfalse when the syllable has no reference IPA; its accuracy is then not a verdict, which tells it apart from a real 0
readingstring | nullChinese: pinyin with tone marks ("hǎo"); Japanese: romaji per mora ("ka"); null in other languages
prosodyProsody | nullTone (Chinese) or pitch accent (Japanese) as judged by the model; see Prosody Fields. null in other languages

Prosody Fields

prosody is the model's verdict on how a syllable was pitched: its tone in Chinese, or the pitch accent of a mora in Japanese. It compares what the text calls for (expected) with what the model heard (heard). In all other languages it is null. It is a different thing from pitch, which is only a measurement of how high the syllable was compared with the rest of the recording.

Tone and pitch-accent checks are experimental. They are tuned to avoid false alarms: when is_error is true, the tone or pitch was very likely wrong, but subtle slips are often not flagged yet. In Chinese, a wrong tone also sets the word's is_error, because a different tone makes a different word. In Japanese, a wrong pitch only shows on the mora and does not mark the word wrong.

FieldTypeDescription
kind"tone" | "pitch""tone" for Chinese, "pitch" for Japanese
expectedstringWhat the text calls for, in context; see the values below
heardstringThe tone or pitch the model found most likely, in the same values (for "2|3" a single tone). It can differ from expected without being an error; use is_error for the verdict
scorenumberHow sure the model is that the expected tone or pitch was said (0.0 – 1.0)
is_errorbooleantrue when the expected tone or pitch is very unlikely (score below our cut-off). Show it on this syllable; in Chinese the word is then marked wrong as well
LanguagekindUnitValues of expected and heard
Chinese (zh)toneCharacter (each character is one word with one syllable)"1" high level, "2" rising, "3" dipping, "4" falling, "5" neutral. "2|3" where third-tone sandhi allows both, e.g. the first syllable of 你好: either is correct
Japanese (ja)pitchMora"H" high or "L" low, following the Tokyo pitch accent of the word in context
// zh: 好 said with a rising tone instead of the dipping third tone
{ "text": "好", "reading": "hǎo",
  "prosody": { "kind": "tone", "expected": "3", "heard": "2", "score": 0.08, "is_error": true } }

// ja: the mora が, low as expected
{ "text": "が", "reading": "ga",
  "prosody": { "kind": "pitch", "expected": "L", "heard": "L", "score": 0.99, "is_error": false } }

Reading the Results

  • Mark errors with is_error, not with your own cut-off on accuracy. is_error is tuned to avoid false alarms: when it is true, the word was very likely said wrong. accuracy is the grade: below 0.7 for words marked wrong, 0.7 or above for accepted ones.
  • Syllables show where. A syllable can score below 0.7 inside a word that is not marked as an error: one sound was off, but not enough to call the whole word wrong. Show it as a hint (for example a light highlight on that syllable), not as an error.
  • detected_ipa is what the model heard. It can differ from expected_ipa even when the pronunciation is fine (accents, natural variation), so judge by accuracy and is_error, not by comparing the two strings.
  • Tone and pitch: show reading (pinyin or romaji) with each syllable and mark the ones where prosody.is_error is true, naming the tone heard ("tone 2 instead of 3"). For Japanese, drawing the expected H/L line over the morae is often clearer than single labels. Treat it as a hint, since the check is experimental.
  • Single words and short phrases (under 3 words): accuracy is never higher than the words' own scores, so a word marked wrong cannot get a high exercise score.
  • When is_scored is false there was nothing to judge (no reference pronunciation): show the word or syllable neutrally, not as an error or a 0.

Supported Languages (22 total)

LanguageCode
🇯🇵 Japaneseja
🇬🇧 Englishen
🇩🇪 Germande
🇫🇷 Frenchfr
🇪🇸 Spanishes
🇭🇺 Hungarianhu
🇧🇬 Bulgarianbg
🇨🇿 Czechcs
🇬🇷 Greekel
🇫🇮 Finnishfi
🇮🇹 Italianit
🇰🇷 Koreanko
🇳🇱 Dutchnl
🇵🇱 Polishpl
🇵🇹 Portuguesept
🇸🇪 Swedishsv
🇺🇦 Ukrainianuk
🇩🇰 Danishda
🇳🇴 Norwegiannb
🇷🇺 Russianru
🇹🇷 Turkishtr
🇨🇳 Chinese (Mandarin)zh
💡 Numbers, dates and currency amounts are expanded automatically for English, German, French and Spanish. Other languages score them as written.

Rate Limits & Quotas

Quota System

Your monthly quota is measured in audio minutes and is shared across all your API keys. Every scored request returns X-Quota-Limit (included minutes per month) and X-Quota-Remaining (included minutes left after this request; 0 once you are in overage). Check your current usage in the Dashboard.

Free Tier

  • 15 minutes per month
  • Hard limit - requests blocked when quota exhausted
  • Returns 402 when the quota is used up

Paid Tiers

  • Higher monthly quotas (180 min – 13,200 min depending on plan)
  • Overage is off by default: when the quota is used up, requests return 402. Turn it on in the Subscription page to continue at a per-minute rate, collected at the end of the month
  • Overage rates: €0.02 - €0.05 per minute depending on plan

💡 Tip: Monitor your usage regularly to avoid unexpected charges. Upgrade your plan in the Subscription page.

Error Handling

Status CodeErrorSolution
401Invalid or missing API keyCheck your Authorization header
403No active API subscriptionSubscribe to a plan on the pricing page
400Invalid audio formatUse WAV, MP3, M4A, OGG, FLAC, or WEBM format
413Audio file too largeKeep uploads under 10 MiB; encode to MP3/Opus instead of WAV
402Quota used up (and overage off or its spend cap reached)Turn on overage, raise the spend cap, upgrade, or wait for the next billing period. Don't retry
429Too many requestsWait for the seconds in Retry-After, then retry
503Service unavailableRetry after a short delay

Need Help?

Have questions or need support integrating the API? We're here to help!

Contact Support