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 17 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.accuracy, r.completeness, 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
accuracy Overall pronunciation accuracy, 0–1
completeness How much of the expected utterance was actually said, 0–1
speaking_rate Syllables per second
words[] text, accuracy, completeness, start_ms, end_ms, char_start, char_end
words[].syllables[] text, expected_ipa, detected_ipa, accuracy, completeness, pitch, duration_ms, start_ms, end_ms, is_missing, is_extra

pitch is one of "high", "flat", "low", "unknown".

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 de el en es fi fr hu it ja ko nl pl pt sv uk — 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.

Links

MIT licensed.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lingolix-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lingolix-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file lingolix-0.1.0.tar.gz.

File metadata

  • Download URL: lingolix-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lingolix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0599795d9aff119fdc28ece92dff2c1a1acbde9b4aa58608e838edbd8fac8b44
MD5 7106b874f4a644f77a06d306aeef45a3
BLAKE2b-256 a50172ccbdf6c7c676bc274a99ae056ea9669f688f0d2ee6ba999664b8242dff

See more details on using hashes here.

Provenance

The following attestation bundles were made for lingolix-0.1.0.tar.gz:

Publisher: release.yml on lingolix/lingolix-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lingolix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lingolix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lingolix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d75178cc970a3dd35ddda55c0db7a541ff127e7c8bd0633615efa5149e6d3a0
MD5 940518494d515a39b0d5fb0aea84bf91
BLAKE2b-256 601783d509af0feef8efa936ab9d09b4183874bf990cc68084a11b67e319cfc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for lingolix-0.1.0-py3-none-any.whl:

Publisher: release.yml on lingolix/lingolix-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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