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.
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.
🔬 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.
/api/pronunciation/v4/checkSyllable-level pronunciation analysis with 22-language support
✨ Operating Modes:
sentence parameter → Scores pronunciation syllable-by-syllable against expected textsentence parameter → Whisper AI transcribes your speech first, then scores pronunciation| Parameter | Type | Required | Description |
|---|---|---|---|
| speechdata | file | Yes | Audio file (WAV, MP3, M4A, OGG, FLAC, WEBM). Max 10 MiB and 60 seconds; longer recordings are rejected with status code 400. |
| sentence | string | No | Expected text to compare against. If omitted, Whisper transcribes speech first ("Just Talk" mode). |
| language_code | string | Yes | Language 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.
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}")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
}
]
}Show overall as the score; accuracy and fluency explain it, and the words and syllables show where.
| Field | Type | Description |
|---|---|---|
| text | string | The expected sentence, or the transcript in Just Talk mode |
| overall | number | The score to show (0.0 – 1.0): accuracy and fluency weighted as human raters weigh them. Always present; equals accuracy when fluency is null |
| accuracy | number | How well the sounds were pronounced (0.0 – 1.0) |
| fluency | number | null | Pace 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) |
| completeness | number | Fraction of the expected utterance that was said |
| speaking_rate | number | Syllables (Japanese: morae) per second, from the first syllable's start to the last's |
| target_speaking_rate | number | null | Pace from which fluency gets full credit, in the same unit: 60% of a typical native pace for the language, so learners have room |
| model_version | string | null | Which 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 |
| assessable | boolean | false 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" | null | Why 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 |
| words | Word[] | Per-word results, see Word Fields |
| Field | Type | Description |
|---|---|---|
| text | string | Word text |
| accuracy | number | How well the word's sounds were pronounced, judged by its weakest sound (0.0 – 1.0) |
| completeness | number | Fraction of the word's syllables detected |
| start_ms | number | Start offset in milliseconds |
| end_ms | number | End offset in milliseconds |
| char_start | integer | Character 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_end | integer | Character index (exclusive) where this word ends in the response's text field. -1 under the same conditions as char_start |
| is_scored | boolean | false when the word couldn't be scored (no reference pronunciation); its accuracy is then not a verdict |
| is_error | boolean | Our 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_ms | number | null | Pause before or inside this word, in milliseconds beyond the speaker's usual gap; null if none. Pauses at punctuation never count |
| reading | string | null | Japanese: Hepburn romaji with macrons ("tōkyō"); null in other languages |
| syllables | Syllable[] | Per-syllable results, see Syllable Fields |
| Field | Type | Description |
|---|---|---|
| text | string | Syllable text (e.g. "ni") |
| expected_ipa | string | Expected IPA transcription |
| detected_ipa | string | Detected IPA from audio |
| accuracy | number | Phoneme-level accuracy (0.0 – 1.0) |
| completeness | number | Fraction of expected phonemes detected |
| duration_ms | number | Syllable duration in milliseconds |
| start_ms | number | Start offset in milliseconds |
| end_ms | number | End offset in milliseconds |
| is_missing | boolean | true if the user skipped this syllable |
| is_extra | boolean | true if the user said something not in target |
| is_scored | boolean | false when the syllable has no reference IPA; its accuracy is then not a verdict, which tells it apart from a real 0 |
| reading | string | null | Chinese: pinyin with tone marks ("hǎo"); Japanese: romaji per mora ("ka"); null in other languages |
| prosody | Prosody | null | Tone (Chinese) or pitch accent (Japanese) as judged by the model; see Prosody Fields. null in other languages |
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.
| Field | Type | Description |
|---|---|---|
| kind | "tone" | "pitch" | "tone" for Chinese, "pitch" for Japanese |
| expected | string | What the text calls for, in context; see the values below |
| heard | string | The 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 |
| score | number | How sure the model is that the expected tone or pitch was said (0.0 – 1.0) |
| is_error | boolean | true 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 |
| Language | kind | Unit | Values of expected and heard |
|---|---|---|---|
| Chinese (zh) | tone | Character (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) | pitch | Mora | "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 } }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.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.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.accuracy is never higher than the words' own scores, so a word marked wrong cannot get a high exercise score.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.| Language | Code |
|---|---|
| 🇯🇵 Japanese | ja |
| 🇬🇧 English | en |
| 🇩🇪 German | de |
| 🇫🇷 French | fr |
| 🇪🇸 Spanish | es |
| 🇭🇺 Hungarian | hu |
| 🇧🇬 Bulgarian | bg |
| 🇨🇿 Czech | cs |
| 🇬🇷 Greek | el |
| 🇫🇮 Finnish | fi |
| 🇮🇹 Italian | it |
| 🇰🇷 Korean | ko |
| 🇳🇱 Dutch | nl |
| 🇵🇱 Polish | pl |
| 🇵🇹 Portuguese | pt |
| 🇸🇪 Swedish | sv |
| 🇺🇦 Ukrainian | uk |
| 🇩🇰 Danish | da |
| 🇳🇴 Norwegian | nb |
| 🇷🇺 Russian | ru |
| 🇹🇷 Turkish | tr |
| 🇨🇳 Chinese (Mandarin) | zh |
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.
💡 Tip: Monitor your usage regularly to avoid unexpected charges. Upgrade your plan in the Subscription page.
| Status Code | Error | Solution |
|---|---|---|
| 401 | Invalid or missing API key | Check your Authorization header |
| 403 | No active API subscription | Subscribe to a plan on the pricing page |
| 400 | Invalid audio format | Use WAV, MP3, M4A, OGG, FLAC, or WEBM format |
| 413 | Audio file too large | Keep uploads under 10 MiB; encode to MP3/Opus instead of WAV |
| 402 | Quota 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 |
| 429 | Too many requests | Wait for the seconds in Retry-After, then retry |
| 503 | Service unavailable | Retry after a short delay |