How freyavoiceai/freyatts works
FreyaTTS-small is a Turkish text-to-speech model whose main runtime path turns text into 48 kHz speech: the pipeline normalizes and splits text, predicts latent duration, runs the flow-matching DiT, and decodes latents with a frozen AudioVAE. The repository also contains latent-data preparation, pretraining and two SFT stages, plus a speed benchmark. Edges are limited to relationships shown in excerpts or documented in the README; unsampled implementation details are not inferred.
Main entry points: pipeline.py Synthesis pipeline · vae.py Frozen AudioVAE · batch_infer.py Batch inference · extract_short_segments.py Short-segment extraction
Components 19
Speech synthesis
- CLI inference
infer.py - Batch inference
batch_infer.py - Synthesis pipeline
freyatts/pipeline.py - Text normalization
freyatts/pipeline.py
Model components
- Flow-matching DiT
freyatts/model.py - Character vocabulary
freyatts/char_vocab.json - Frozen AudioVAE
freyatts/vae.py
Training pipeline
- Audio/text manifest
- Latent precomputation
training/precompute_latents.py - Short-segment extraction
training/extract_short_segments.py - Latent shards
- Pretraining
training/pretrain.py - SFT stages
training/sft.py - SFT configurations
training/configs
Evaluation
- Speed benchmark
eval/speed.py - Benchmark results
Other components
- Text caller
- VoxCPM2 AudioVAE weights
- 48 kHz waveform
Connections 26
- Text caller → CLI inference: provides text
README.md - CLI inference → Synthesis pipeline: invokes
infer.py - Text caller → Batch inference: provides texts
README.md - Batch inference → Flow-matching DiT: runs denoising
batch_infer.py - Batch inference → Frozen AudioVAE: decodes latents
batch_infer.py - Synthesis pipeline → Text normalization: normalizes text
freyatts/pipeline.py - Synthesis pipeline → Flow-matching DiT: predicts latents
freyatts/pipeline.py - Synthesis pipeline → Frozen AudioVAE: decodes latents
freyatts/pipeline.py - Synthesis pipeline → Character vocabulary: loads vocabulary
freyatts/pipeline.py - Synthesis pipeline → 48 kHz waveform: returns audio
README.md - Batch inference → 48 kHz waveform: writes audio
batch_infer.py - Frozen AudioVAE → VoxCPM2 AudioVAE weights: loads weights
freyatts/vae.py - Audio/text manifest → Latent precomputation: supplies clips
README.md - Latent precomputation → Frozen AudioVAE: encodes audio
training/precompute_latents.py - Latent precomputation → Latent shards: writes shards
training/precompute_latents.py - Audio/text manifest → Short-segment extraction: supplies clips
training/extract_short_segments.py - Short-segment extraction → Frozen AudioVAE: encodes segments
training/extract_short_segments.py - Short-segment extraction → Latent shards: writes shards
training/extract_short_segments.py - Latent shards → Pretraining: provides training data
training/pretrain.py - Pretraining → Flow-matching DiT: trains model
training/pretrain.py - Pretraining → SFT stages: initializes stages
README.md - Latent shards → SFT stages: provides training data
training/sft.py - Short-segment extraction → SFT stages: adds stage-two data
training/extract_short_segments.py - SFT configurations → SFT stages: configures stages
README.md - Speed benchmark → Synthesis pipeline: measures synthesis
eval/speed.py - Speed benchmark → Benchmark results: reports metrics
eval/speed.py