Metadata-Version: 2.4
Name: lectura-ctc
Version: 1.0.1
Summary: Decodeur phonetique CTC du francais — audio vers phones IPA (CNN-BiGRU-CTC)
Author-email: Max Carriere <contact@lec-tu-ra.com>
License: AGPL-3.0-or-later
Project-URL: Homepage, https://www.lec-tu-ra.com/solutions/outils/modules/
Project-URL: Repository, https://github.com/maxcarriere/lectura-modules/tree/main/CTC
Project-URL: Issues, https://github.com/maxcarriere/lectura-modules/issues
Keywords: stt,asr,ctc,french,phonetic,ipa
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: French
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENCE-COMMERCIALE.md
License-File: LICENCE.txt
Requires-Dist: numpy>=1.24
Provides-Extra: onnx
Requires-Dist: onnxruntime>=1.16; extra == "onnx"
Provides-Extra: micro
Requires-Dist: sounddevice>=0.4; extra == "micro"
Dynamic: license-file

# lectura-ctc — Decodeur phonetique CTC du francais

Transcription audio vers phonemes IPA via un modele CNN-BiGRU-CTC (3.5M params, PER ~6%).

## Installation

```bash
# Avec backend ONNX (recommande)
pip install lectura-ctc[onnx]

# Sans ONNX (mode API uniquement)
pip install lectura-ctc
```

## Utilisation

```python
import numpy as np
from lectura_ctc import creer_engine

engine = creer_engine()

# Audio PCM float32 mono 16kHz
audio = np.zeros(16000, dtype=np.float32)  # 1 seconde de silence
result = engine.transcrire(audio)
print(result)  # chaine IPA : "b ɔ̃ ʒ u ʁ | l ə | m ɔ̃ d"
```

## Backends

| Backend | Dependance | Latence | Modele |
|---------|-----------|---------|--------|
| ONNX Runtime | `onnxruntime` | ~10 ms/s audio | `phone_ctc_int8.onnx` (13 Mo) |
| API | aucune | ~100 ms/s audio | serveur Lectura |

## Parametres audio

- Sample rate : 16 kHz
- Format : PCM float32 mono
- Mel : 80 bins, n_fft=512, hop=160, win=400

## Licence

Double licence : [AGPL-3.0](LICENCE.txt) (libre) + [Licence Commerciale](LICENCE-COMMERCIALE.md) (payante).

Les modeles ONNX sont distribues separement — voir [MODEL_LICENCE.md](../MODEL_LICENCE.md).

## Auteur

Max Carriere — [lec-tu-ra.com](https://www.lec-tu-ra.com)
