Skip to main content

lingolix

Python client for the Lingolix pronunciation scoring API. Send a recording, get back per-syllable accuracy with expected vs. detected IPA, pitch and timing — in 22 languages.

Get an API key at lingolix.com/api-portal, then set LINGOLIX_API_KEY in your environment. Keep it server-side — never ship it to a browser.

Install

pip install lingolix      # or: uv add lingolix

Usage

from lingolix import Lingolix

with Lingolix() as client:                       # key from $LINGOLIX_API_KEY
    r = client.check("audio.wav", sentence="Guten Morgen", language="de")

    print(r.overall, r.accuracy, r.fluency, r.speaking_rate)
    for word in r.words:
        for s in word.syllables:
            print(s.text, s.expected_ipa, "→", s.detected_ipa, s.pitch, round(s.accuracy, 2))

Async is the same class with an Async prefix:

from lingolix import AsyncLingolix

async with AsyncLingolix() as client:
    r = await client.check(audio_bytes, sentence="こんにちは", language="ja")

check() takes a path, bytes, or any file-like object. Drop sentence and the audio is transcribed first, then scored against its own transcription — useful for free-form speech.

Result shape

Field Meaning
text What the audio was scored against — your sentence, or the transcription
overall The score to show, 0–1: accuracy and fluency weighted as human raters weigh them
accuracy How well the sounds were pronounced, 0–1
fluency Pace and pauses, 0–1; None/null when the utterance is too short to time (then overall = accuracy)
completeness How much of the expected utterance was actually said, 0–1
speaking_rate Syllables (Japanese: morae) per second
target_speaking_rate Pace from which fluency gets full credit (60% of a typical native pace)
model_version Which model and scoring produced the numbers, e.g. "2026-11"; changes when an update shifts scores
words[] text, accuracy, completeness, start_ms, end_ms, char_start, char_end, hesitation_ms (pause before or inside the word, else None/null), is_error (mark the word wrong; same as accuracy < 0.7), reading (Japanese romaji)
words[].syllables[] text, expected_ipa, detected_ipa, accuracy, completeness, pitch, duration_ms, start_ms, end_ms, is_missing, is_extra, reading (Chinese pinyin, Japanese romaji), prosody

pitch is the measured pitch level, one of "high", "flat", "low", "unknown": the syllable's average pitch against the speaker's average in this utterance. It is a measurement, not a verdict; for Chinese tones and Japanese pitch accent use prosody.

prosody is the tone (Chinese) or pitch accent (Japanese), else None/null: kind ("tone" or "pitch"), expected and heard (zh: "1"–"5", "2|3" under third-tone sandhi; ja: "H" / "L"), score and is_error. In Chinese, each character is one word, and a wrong tone marks it wrong.

Errors

Every failure is a subclass of LingolixError carrying .status and .detail.

Class HTTP Cause
InvalidAudioError 400, 413 Undecodable audio, or over the 10 MiB limit
AuthenticationError 401 Missing, malformed or unknown API key
SubscriptionError 403 No active API subscription
QuotaExceededError 429 Monthly quota exhausted
ServiceUnavailableError 503 Scoring service temporarily down

QuotaExceededError also carries plan, remaining_minutes, quota_percentage and upgrade_url:

from lingolix import Lingolix, QuotaExceededError

try:
    r = Lingolix().check("audio.wav", language="en")
except QuotaExceededError as e:
    print(f"{e.plan} plan is out of minutes — upgrade at {e.upgrade_url}")

Languages

bg cs da de el en es fi fr hu it ja ko nb nl pl pt ru sv tr uk zh — the default is ja.

Audio

Anything ffmpeg can read: WAV, MP3, M4A, OGG/Opus, FLAC, WebM. Uploads are capped at 10 MiB, checked client-side before sending. Prefer a compressed format — a single utterance is well under 1 MiB as MP3 or Opus.

MIT licensed.

Metadata

Release files for lingolix 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lingolix 0.4.0
File Size Uploaded Provenance Actions
lingolix-0.4.0.tar.gz 9.5 kB With provenance Details for lingolix-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lingolix 0.4.0
File Interpreter ABI Platform Actions
lingolix-0.4.0-py3-none-any.whl Python 3 none any Details for lingolix-0.4.0-py3-none-any.whl

Total release size: 17.9 kB

Release files / lingolix-0.4.0.tar.gz

Download URL lingolix-0.4.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eb5405bbe0ada0a5b80c7082d9cd96eeb6a817f4ce4f19221e9157c645733202
BLAKE2b-256 checksum
How to use checksums
fd40ffc1a323a92e77a563f3c7a56253e5ca3cb62b648eb4df4dd8f30b1ce8c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / lingolix-0.4.0-py3-none-any.whl

Download URL lingolix-0.4.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6295713b4129784cc9a1de1294f58b3be19d3c03e6fd677ea37c8190d99c0c72
BLAKE2b-256 checksum
How to use checksums
0c915147ec488a1d39ed3bf118678f7c92e64ef896d0534530698b80eb794322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for lingolix 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lingolix-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page