Skip to main content

lectura-diphone

Synthese vocale francaise par concatenation de diphones dans le domaine WORLD.

Installation

# Sans dependances (import seul)
pip install lectura-diphone

# Inference locale (pyworld + numpy + scipy)
pip install "lectura-diphone[local]"

Pour le pipeline complet texte → audio, utilisez pip install lectura-tts-dipho (inclut le G2P).

Utilisation

Depuis du texte (necessite lectura-phonemiseur)

from lectura_diphone import synthetiser

audio = synthetiser("Bonjour le monde")
# audio: numpy array float32, 44100 Hz

Depuis des phonemes IPA

from lectura_diphone import creer_engine

engine = creer_engine()
audio = engine.synthesize_groups([
    {"phones": ["b", "ɔ̃", "ʒ", "u", "ʁ"], "boundary": "none"},
    {"phones": ["l", "ə", "m", "ɔ̃", "d"], "boundary": "period"},
])

Controles prosodiques

Parametre Defaut Description
duration_scale 1.0 Vitesse globale (>1 = plus lent)
pause_scale 1.0 Duree des pauses inter-groupes
macro_expressivity 2.0 Gestes prosodiques (0=neutre, 4=exagere)
micro_expressivity 5.0 Micro-variations (0=robot, 10=tres expressif)
spectral_contrast 1.5 Contraste spectral (1.0=off, 2.0=fort)
prosody_style "auto" "declaratif", "question", "exclamation", "suspensif", "neutre"
seed None Graine pour micro-prosodie reproductible

Modes de synthese

  • FLUIDE : lecture naturelle, enchainement continu
  • MOT_A_MOT : lecture mot par mot avec pauses
  • SYLLABES : lecture syllabe par syllabe

Architecture

Texte → [G2P] → Phonemes IPA → Diphone chain
                                      ↓
                              WORLD params (F0 + SP + AP)
                                      ↓
                              Stretch + Concat (overlap)
                                      ↓
                              Prosodie (F0 contour + durees)
                                      ↓
                              GV compensation (contraste spectral)
                                      ↓
                              pw.synthesize → Audio 44100 Hz

Les diphones sont des parametres WORLD (F0 + spectral envelope + aperiodicity) extraits du corpus SIWIS et moyennes par type de transition phonetique.

Emplacements des modeles

Recherche dans l'ordre :

  1. Parametre models_dir explicite
  2. $LECTURA_MODELS_DIR/tts_diphone/
  3. ~/.lectura/models/tts_diphone/
  4. Modeles embarques dans le package

Fichier requis : diphones.dpk.gz (ou .dpk.gz.enc chiffre) Fichier optionnel : diphone_statistics.pkl

Licence

Double licence : AGPL-3.0 (code) + Licence Commerciale (modeles).

Metadata

Release files for lectura-diphone 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lectura-diphone 2.0.2
File Size Uploaded
lectura_diphone-2.0.2.tar.gz 87.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lectura-diphone 2.0.2
File Interpreter ABI Platform
lectura_diphone-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 169.1 kB

Release files / lectura_diphone-2.0.2.tar.gz

Download URL lectura_diphone-2.0.2.tar.gz
Size 87.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1506540919585b02b59fc01b5dfefa9a6c37502bfdc07af46f2660b436e44c4d
BLAKE2b-256 checksum
How to use checksums
5743f8b84964827a8d4fa5fbabc9f09030266f83ab2e450761c0ea3a07dd781b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / lectura_diphone-2.0.2-py3-none-any.whl

Download URL lectura_diphone-2.0.2-py3-none-any.whl
Size 81.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa9673940231604b3cdb6ea877dcd080627fc941e80eddc1b36889c1ddbeda65
BLAKE2b-256 checksum
How to use checksums
3fc81f13920f8c2b7251fd24215711d471ff5426eb8aa8bd2dcbbbe71aaa0f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page