Metadata-Version: 2.4
Name: loqalkit
Version: 1.6.4
Summary: Unified language SDK — detection, transcription, romanization, translation, TTS routing
Project-URL: Homepage, https://loqal.digital
Author: Sorato Group
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Keywords: language,romanization,transcription,translation,tts
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.11
Requires-Dist: babel>=2.14.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: openai>=1.0.0
Provides-Extra: localize
Requires-Dist: beautifulsoup4>=4.12; extra == 'localize'
Requires-Dist: lxml>=5.0; extra == 'localize'
Requires-Dist: pillow>=10.0; extra == 'localize'
Provides-Extra: serve
Requires-Dist: fastapi>=0.100; extra == 'serve'
Requires-Dist: pyjwt[crypto]>=2.8; extra == 'serve'
Requires-Dist: python-multipart>=0.0.6; extra == 'serve'
Requires-Dist: uvicorn[standard]>=0.22; extra == 'serve'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Provides-Extra: vad
Requires-Dist: numpy>=1.24; extra == 'vad'
Requires-Dist: onnxruntime>=1.16; extra == 'vad'
Description-Content-Type: text/markdown

# LoqalKit

Unified language SDK — detection, transcription, romanization, translation, and TTS routing.

LoqalKit is the client library for the [Loqal](https://loqal.digital) language platform. It
gives you one consistent API across language detection, speech-to-text, romanization,
translation, and text-to-speech, and routes each request to the right engine for the target
language.

## Install

```bash
pip install loqalkit
```

Optional extras:

```bash
pip install "loqalkit[vad]"        # voice-activity gating + segment timestamp refinement
pip install "loqalkit[localize]"   # OOXML document localization
pip install "loqalkit[serve]"      # run the bundled HTTP service
```

`vad` is strongly recommended for server use. Without it the voice-activity gate is skipped
and the transcription model is fed silence and noise, which it will readily hallucinate whole
languages over. Transcription still works without the extra — it is simply less accurate.

## Authentication

LoqalKit routes model calls through the Loqal platform, which requires a key. The library
raises on first use without one — it performs no useful work standalone.

```bash
export MANABU_APP_SECRET="..."
```

Keys are issued from the Loqal dashboard. Contact <support@loqal.digital> for access.

## Usage

```python
from pathlib import Path

from loqalkit import (
    detect_language_from_text,
    romanize_batch,
    transcribe,
)

result = transcribe(Path("meeting.wav"), language="he", diarize=True)

detected = detect_language_from_text(result["text"])

roman = romanize_batch(["こんにちは", "ありがとう"], lang_code="ja")
```

`romanize_batch` returns a list aligned 1:1 with its input, using `None` for entries the
model did not romanize, so callers can fall back to untransliterated display. It never
raises.

## Supported Python

Python 3.11 and newer.

## License

Proprietary — see [LICENSE](LICENSE). Third-party components are listed in
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
