Metadata-Version: 2.5
Name: llama-index-readers-lokutor
Version: 0.1.0
Summary: llama-index readers lokutor integration: transcribe audio into Documents with Lokutor speech-to-text
Project-URL: Homepage, https://lokutor.com
Project-URL: Documentation, https://docs.lokutor.com
Project-URL: Source, https://github.com/lokutor-ai/llama-index-lokutor
Author-email: Lokutor AI <contact@lokutor.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: <4.0,>=3.10
Requires-Dist: httpx>=0.25
Requires-Dist: llama-index-core<0.15,>=0.13.0
Description-Content-Type: text/markdown

# LlamaIndex Readers Integration: Lokutor

Transcribe audio files into LlamaIndex `Document`s with [Lokutor](https://lokutor.com) speech-to-text (Conv 2.0; English, Spanish, Catalan, Galician, Basque, Portuguese, French, Italian, German), with optional speaker diarization.

```bash
pip install llama-index-readers-lokutor
export LOKUTOR_API_KEY=...   # https://app.lokutor.com
```

```python
from llama_index.readers.lokutor import LokutorReader

reader = LokutorReader(language="en", diarize=True)  # language=None detects it
docs = reader.load_data("meeting.wav")
print(docs[0].text, docs[0].metadata["speakers"])

# index it
from llama_index.core import VectorStoreIndex
index = VectorStoreIndex.from_documents(docs)
```

- `load_data` / `aload_data` take a path, `bytes` or a file-like object, and return one `Document`.
- Metadata: `file_path`, `language_code`; with `diarize=True` also `speakers`; with `include_words=True` the per-word timings in `words`.
- **Lokutor decodes WAV only** (PCM 8 or 16 bit, mono or stereo, 8-48 kHz). Convert MP3/M4A first.
- API errors (bad key, unsupported audio, no balance) raise `RuntimeError` with Lokutor's message.

API docs: [docs.lokutor.com](https://docs.lokutor.com/api-reference/speech-to-text). Licence: Apache-2.0.
