lectura-monospeaker
Moteur de synthese vocale neuronale monospeaker pour le francais — deux modeles au choix : high (Matcha-Conformer) et light (FastPitch) + HiFi-GAN (ONNX).
Installation
# Version minimale (API distante, zero deps)
pip install lectura-monospeaker
# Version locale (inference ONNX)
pip install lectura-monospeaker[onnx]
Pour le pipeline complet texte → audio, utilisez
pip install lectura-tts-mono(inclut le G2P).
Utilisation
Depuis des phonemes IPA
from lectura_monospeaker import creer_engine
# Modele high (Conformer, meilleure qualite) — par defaut
engine = creer_engine(mode="local")
result = engine.synthesize_phonemes(
"bɔ̃ʒuʁ",
phrase_type=0,
pitch_range=1.3,
)
# Modele light (FastPitch, plus rapide/leger)
engine_light = creer_engine(mode="local", model="light")
result = engine_light.synthesize_phonemes("bɔ̃ʒuʁ")
Raccourci synthetiser()
from lectura_monospeaker import synthetiser
# High (defaut)
audio = synthetiser("Bonjour le monde.")
# Light
audio = synthetiser("Bonjour le monde.", model="light")
Via l'API distante
from lectura_monospeaker import creer_engine
engine = creer_engine(mode="api", api_url="https://api.lectura.world")
result = engine.synthesize("Bonjour")
Modeles
| Modele | Architecture | Taille (INT8) | Qualite | Vitesse |
|---|---|---|---|---|
| high (defaut) | Matcha-Conformer + HiFi-GAN | ~29 Mo | Meilleure | ~30x temps-reel |
| light | FastPitch + HiFi-GAN | ~28 Mo | Bonne | ~50x temps-reel |
Controles prosodiques
| Parametre | Defaut | Description |
|---|---|---|
| duration_scale | 1.0 | Vitesse globale |
| pitch_shift | 0.0 | Decalage F0 (demi-tons) |
| pitch_range | 1.3 | Variation F0 (1.0 = neutre) |
| energy_scale | 1.0 | Intensite |
| pause_scale | 1.0 | Duree des pauses |
| phrase_type | 0 | 0=decl, 1=inter, 2=excl, 3=susp |
Architecture
- high : Matcha-Conformer — phonemes → mel-spectrogramme via flow matching ODE
- light : FastPitch — phonemes → mel-spectrogramme via FFT decoder
- HiFi-GAN V1 : mel → audio 22050 Hz (partage)
- Runtime : ONNX (pas de dependance PyTorch)
Emplacements des modeles
Recherche dans l'ordre :
- Parametre
models_direxplicite $LECTURA_MODELS_DIR/tts_mono/~/.lectura/models/tts_mono/- Modeles embarques dans le package (version privee)
Chaque emplacement peut contenir des sous-repertoires conformer/ et fastpitch/ (nouveau layout) ou les fichiers directement (ancien layout, retrocompatible).
Licence
Code source sous licence AGPL-3.0 — voir LICENCE.txt. Modeles pre-entraines : voir MODEL_LICENCE.md.
Licence commerciale et modeles locaux disponibles — contacter admin@lectura.world.
Metadata
Release files for lectura-monospeaker 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_monospeaker-4.0.1.tar.gz | 29.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lectura_monospeaker-4.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.2 kB
Release files / lectura_monospeaker-4.0.1.tar.gz
| Download URL | lectura_monospeaker-4.0.1.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad5558a1b00083b3991a4b1d4e97ffab0887eef7b1528f1336b06dcd642417e8
|
|
BLAKE2b-256 checksum How to use checksums |
e4f032e3ca6350f1d06f87f779e2a1661d3c183ef2dfb0e3a9220ff2b417129f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / lectura_monospeaker-4.0.1-py3-none-any.whl
| Download URL | lectura_monospeaker-4.0.1-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e81d3a16c9581dfa81a01092616573ad9863e0f6400534e58701a259c4f6c8e
|
|
BLAKE2b-256 checksum How to use checksums |
bc1e4fe21dfb52cee8c8a8bd0967a69177d614fc31c57fff3e295f1fe0e4c4b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|