Lectura — French NLP & Speech Toolkit
Suite complete de traitement linguistique et vocal du francais. Tokenisation, phonetique, syllabation, correction orthographique, synthese vocale et plus.
A comprehensive French natural language processing and speech toolkit. Tokenization, phonetics, syllabification, spell-checking, text-to-speech, and more.
pip install lectura # meta-package (tout installer)
pip install lectura-phonemiseur # ou un seul module
Modules atomiques (couche 1)
| Module | Description | Version | pip install |
|---|---|---|---|
| Tokeniseur | Normalisation et tokenisation du francais, detection de formules | 2.3.3 | pip install lectura-tokeniseur |
| Formules | Lecture algorithmique des formules (nombres, dates, heures...) | 3.7.6 | pip install lectura-formules |
| Phonemiseur | G2P neural : grapheme-to-phoneme + POS + Morpho + Liaison | 4.1.6 | pip install lectura-phonemiseur |
| Graphemiseur | P2G neural : phoneme-to-grapheme + POS + Morpho (IPA → orthographe) | 4.3.5 | pip install lectura-graphemiseur |
| Aligneur-Syllabeur | Alignement grapheme-phoneme et syllabation / syllabification | 4.0.1 | pip install lectura-aligneur |
| Correcteur | Correcteur orthographique et grammatical du francais | 1.1.1 | pip install lectura-correcteur |
| Decodeur | Decodeur phonetique CTC : audio → phones IPA (CNN-BiGRU-CTC) | 3.0.1 | pip install lectura-decodeur |
| Lexique | Acces au lexique Lectura (359k lemmes, 1.5M formes) | 1.5.0 | pip install lectura-lexique |
Pipelines (couche 2)
| Module | Description | Version | pip install |
|---|---|---|---|
| G2P-Pipeline | Pipeline complet texte → phonetique (tokeniseur + formules + phonemiseur) | 4.1.1 | pip install lectura-g2p |
| P2G-Pipeline | Pipeline complet phonetique → texte | 4.6.2 | pip install lectura-p2g |
| STT | Pipeline audio → texte (CTC + P2G) | 3.2.2 | pip install lectura-stt |
Synthese vocale / Text-to-Speech
| Module | Description | Version | pip install |
|---|---|---|---|
| Monospeaker | TTS neural monospeaker francais (FastPitch + HiFi-GAN) | 4.0.0 | pip install lectura-monospeaker |
| MultiSpeaker | TTS neural multispeaker francais | 4.0.0 | pip install lectura-multispeaker |
| Diphone | TTS par concatenation de diphones WORLD (prosodie reglee) | 2.0.1 | pip install lectura-diphone |
Conversion vocale / Voice Conversion
| Module | Description | Version | pip install |
|---|---|---|---|
| VC-ZeroShot | Conversion vocale zero-shot | 1.2.0 | pip install lectura-vc-zeroshot |
| VC-Locuteurs | Conversion vocale par locuteurs (RVC) | 1.0.0 | pip install lectura-vc-locuteurs |
Caracteristiques / Key Features
- Zero dependance sur les modules de base (Tokeniseur, Formules, Aligneur) — Zero dependencies for core modules
- 4 backends d'inference pour G2P/P2G : API, ONNX Runtime, NumPy, Pure Python — 4 inference backends
- Type hints complets (Python 3.10+, PEP-561) — Full type hints
- Modeles compacts : G2P = 1.8 Mo, P2G = 2.6 Mo (ONNX INT8) — Compact models
- Syllabation explicite par alignement grapheme-phoneme — Explicit syllabification via grapheme-phoneme alignment
Installation rapide / Quick Start
# Tous les modules d'un coup / Install everything
pip install lectura
# Avec backends ONNX pour G2P/P2G (recommande / recommended)
pip install lectura[onnx]
# Un seul module / Single module
pip install lectura-tokeniseur
# Phonemiseur avec backend ONNX
pip install lectura-phonemiseur[onnx]
Exemple / Example
from lectura_tokeniseur import tokenise
from lectura_formules import lire_formule
# Tokeniser du texte francais
tokens = tokenise("Le 1er janvier 2025, j'ai lu 42 pages.")
# Lire une formule (nombre → texte)
result = lire_formule("NOMBRE", "42")
print(result.display_fr) # "quarante-deux"
Licence
Code source sous licence AGPL-3.0. Modeles pre-entraines (.onnx) : voir MODEL_LICENCE.md.
Licence commerciale et modeles locaux disponibles — contacter admin@lectura.world.
Auteur
Max Carriere — lectura.world
Metadata
Release files for lectura 4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lectura-4.0.1.tar.gz | 16.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lectura-4.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / lectura-4.0.1.tar.gz
| Download URL | lectura-4.0.1.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce8da5d62f78c83d66b4cc046ed1eaabc56bde244a747c14d0c73487bed3586e
|
|
BLAKE2b-256 checksum How to use checksums |
99201ffd3e956c4ef085f7aec1ff22dd744adf164d2f161ff53cbb81e4afed02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / lectura-4.0.1-py3-none-any.whl
| Download URL | lectura-4.0.1-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e8069d4ddc2e1d1ea0d1700914731aeace28aa3845d66465e6144e02563e0d8
|
|
BLAKE2b-256 checksum How to use checksums |
d9a2b4da936e76ce1df9ac5927e792524cea371ce3188b00f2f87b7b071e0341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|