How coqui-ai/tts works
Coqui TTS is a Python text-to-speech library spanning text-to-spectrogram models, vocoders, speaker tools, voice conversion, and model-serving utilities. The main user workflow is to provide text and synthesis options through the API or server, then synthesize audio using configured models; the sampled evidence directly connects the API to the synthesizer, but does not expose every internal synthesis step. The repository also documents training, fine-tuning, and dataset curation. Several model families and training paths are represented from the tree and README, so their internal wiring is intentionally not inferred.
Main entry points: synthesizer.py Synthesizer · server.py HTTP Server · api.py TTS API · speakers.py Speaker Manager
Components 25
Synthesis and Serving
- TTS API
TTS/api.py - HTTP Server
TTS/server/server.py - Synthesizer
TTS/utils/synthesizer.py - Synthesis Utilities
TTS/tts/utils/synthesis.py
Speech Models
- TTS Model Registry
TTS/tts/models/__init__.py - Spectrogram Models
TTS/tts/models/tacotron2.py - VITS and YourTTS
TTS/tts/models/vits.py - XTTS
TTS/tts/models/xtts.py - Bark Inference
TTS/tts/layers/bark/inference_funcs.py - Tortoise Model
TTS/tts/models/tortoise.py - Vocoder Registry
TTS/vocoder/models/__init__.py - Vocoder Models
TTS/vocoder/models/wavernn.py
Text and Audio Data
- Text Tokenizer
TTS/tts/utils/text/tokenizer.py - Character Sets
TTS/tts/utils/text/characters.py - TTS Datasets
TTS/tts/datasets/dataset.py - Audio Processing
TTS/utils/audio/processor.py
Speaker and Voice
- Voice Conversion Registry
TTS/vc/models/__init__.py - FreeVC
TTS/vc/models/freevc.py - Speaker Encoder
TTS/encoder/models/resnet.py - Speaker Manager
TTS/tts/utils/speakers.py - Embedding Tool
TTS/bin/compute_embeddings.py
Configuration and Models
- Config Loader
TTS/config/__init__.py - Model Manager
TTS/utils/manage.py - Checkpoint I/O
TTS/utils/io.py
Other components
- Application User
Connections 19
- Application User → TTS API: requests speech
- TTS API → Synthesizer: calls
TTS/api.py - TTS API → Model Manager: manages models
TTS/api.py - HTTP Server → Synthesizer: calls
TTS/server/server.py - HTTP Server → Model Manager: manages models
TTS/server/server.py - HTTP Server → Config Loader: loads config
TTS/server/server.py - HTTP Server → Checkpoint I/O: uses I/O
TTS/server/server.py - Synthesizer → TTS Model Registry: loads models
TTS/utils/synthesizer.py - Synthesizer → Vocoder Registry: loads vocoders
TTS/utils/synthesizer.py - Synthesizer → Voice Conversion Registry: loads conversion
TTS/utils/synthesizer.py - Synthesizer → Synthesis Utilities: uses
TTS/utils/synthesizer.py - Synthesizer → Audio Processing: uses
TTS/utils/synthesizer.py - Text Tokenizer → Character Sets: encodes with
TTS/tts/utils/text/tokenizer.py - Embedding Tool → TTS Datasets: loads samples
TTS/bin/compute_embeddings.py - Embedding Tool → Speaker Manager: updates embeddings
TTS/bin/compute_embeddings.py - Speaker Manager → Speaker Encoder: uses encoder helpers
- FreeVC → Speaker Manager: uses speaker tools
TTS/vc/models/freevc.py - Config Loader → TTS Model Registry: selects config
- Model Manager → Checkpoint I/O: provides checkpoints