How silma-ai/silma-tts works
SILMA TTS is a bilingual Arabic/English voice-cloning speech synthesizer, exposed through a Python API and a Gradio demo. The main flow accepts reference audio and text plus generation text, prepares the text and audio, runs conditional flow-matching inference with a selected transformer backbone, and returns or saves synthesized audio. The README also documents normalization, Arabic diacritization, and F5-TTS-compatible fine-tuning; training is external to this repository. Some internal inference wiring is unsampled, so uncertain links are omitted or marked unverified.
Main entry points: api.py SilmaTTS API · modules.py Neural components · cfm.py Flow matching · app.py Gradio demo
Components 17
User Interfaces
- SilmaTTS API
src/silma_tts/api.py - Gradio demo
src/silma_tts/app.py
Input Preparation
- Text preparation
src/silma_tts/infer/utils_infer.py - Reference audio prep
src/silma_tts/infer/utils_infer.py - Normalization & tashkeel
src/silma_tts/infer/utils_infer.py
Speech Synthesis
- Inference processing
src/silma_tts/infer/utils_infer.py - Flow matching
src/silma_tts/model/cfm.py - Vocoder decoding
src/silma_tts/infer/utils_infer.py - Waveform export
src/silma_tts/api.py
Model Internals
- DiT backbone
src/silma_tts/model/backbones/dit.py - MMDiT backbone
src/silma_tts/model/backbones/mmdit.py - UNetT backbone
src/silma_tts/model/backbones/unett.py - Neural components
src/silma_tts/model/modules.py - Model utilities
src/silma_tts/model/utils.py
Other components
- API caller
- Demo user
- F5-TTS training
Connections 19
- API caller → SilmaTTS API: calls inference
README.md - Demo user → Gradio demo: submits inputs
src/silma_tts/app.py - Gradio demo → SilmaTTS API: calls inference
src/silma_tts/app.py - SilmaTTS API → Text preparation: normalizes text
src/silma_tts/api.py - SilmaTTS API → Reference audio prep: prepares reference
src/silma_tts/api.py - SilmaTTS API → Normalization & tashkeel: requests text processing
README.md - SilmaTTS API → Inference processing: runs inference
src/silma_tts/api.py - Inference processing → Flow matching: invokes model
- Flow matching → Vocoder decoding: decodes mel
- SilmaTTS API → Waveform export: exports waveform
src/silma_tts/api.py - SilmaTTS API → DiT backbone: loads configured model
src/silma_tts/api.py - SilmaTTS API → MMDiT backbone: loads configured model
src/silma_tts/api.py - SilmaTTS API → UNetT backbone: loads configured model
src/silma_tts/api.py - Flow matching → Neural components: uses mel spectrogram
src/silma_tts/model/cfm.py - DiT backbone → Neural components: uses components
src/silma_tts/model/backbones/dit.py - MMDiT backbone → Neural components: uses components
src/silma_tts/model/backbones/mmdit.py - UNetT backbone → Neural components: uses components
src/silma_tts/model/backbones/unett.py - SilmaTTS API → Model utilities: seeds generation
src/silma_tts/api.py - F5-TTS training → SilmaTTS API: reuses model configuration
README.md