How venuaditya/whisperspeech works
WhisperSpeech is a two-stage, token-based text-to-speech system: text is converted to semantic tokens, then acoustic tokens are generated and rendered as audio. Its repository also contains model training and speech-data preparation workflows, including voice-activity detection and speaker-embedding extraction. The README documents the semantic, acoustic, and vocoder stages; source-index references support several preparation and model dependencies. Some central modules, including the main pipeline and model-fetching code, were not excerpted, so their runtime wiring is not asserted here.
Main entry points: s2a_delar_mup_wds_mlang.py Semantic-to-acoustic model · inference.py Inference utilities · t2s_up_wds_mlang_enclm.py Text-to-semantic model · modules.py Neural building blocks
Components 24
Speech generation
- TTS pipeline
whisperspeech/pipeline.py - Audio rendering
whisperspeech/a2wav.py - Inference utilities
whisperspeech/inference.py
Models and training
- Semantic tokens
whisperspeech/vq_stoks.py - Text-to-semantic model
whisperspeech/t2s_up_wds_mlang_enclm.py - Semantic-to-acoustic model
whisperspeech/s2a_delar_mup_wds_mlang.py - Conditioned acoustic model
whisperspeech/s2a_delar_mup_wds_mlang_cond.py - Neural building blocks
whisperspeech/modules.py - Language mapping
whisperspeech/languages.py - Model training
whisperspeech/train.py - Distributed training
whisperspeech/train_multi.py
Speech data preparation
- Voice activity detection
whisperspeech/vad.py - VAD segment merging
whisperspeech/vad_merge.py - Whisper transcription
whisperspeech/wh_transcribe.py - Speaker embeddings
whisperspeech/extract_spk_emb.py - Semantic-token extraction
whisperspeech/extract_stoks.py - Text-model data prep
whisperspeech/prepare_t2s_txts.py - Acoustic-model data prep
whisperspeech/prepare_s2a_atoks.py
Evaluation and metrics
- Model testing
whisperspeech/testing.py - Speech metrics
whisperspeech/extract_metrics.py
Other components
- Text-to-speech user
- Whisper
- EnCodec
- Vocos
Connections 28
- Text-to-speech user → TTS pipeline: requests speech
- TTS pipeline → Text-to-semantic model: generates semantic tokens
- Text-to-semantic model → Semantic-to-acoustic model: conditions generation
- Semantic-to-acoustic model → Audio rendering: renders audio
- Audio rendering → Inference utilities: uses utilities
whisperspeech/a2wav.py - Semantic tokens → Whisper: transcription to tokens
README.md - EnCodec → Semantic-to-acoustic model: tokenizes waveform
README.md - Vocos → Audio rendering: synthesizes audio
README.md - Text-to-semantic model → Neural building blocks: uses building blocks
whisperspeech/t2s_up_wds_mlang_enclm.py - Text-to-semantic model → Language mapping: uses language IDs
whisperspeech/t2s_up_wds_mlang_enclm.py - Semantic-to-acoustic model → Neural building blocks: uses building blocks
whisperspeech/s2a_delar_mup_wds_mlang.py - Semantic-to-acoustic model → Language mapping: uses language IDs
whisperspeech/s2a_delar_mup_wds_mlang.py - Conditioned acoustic model → Neural building blocks: uses building blocks
whisperspeech/s2a_delar_mup_wds_mlang_cond.py - Conditioned acoustic model → Language mapping: uses language IDs
whisperspeech/s2a_delar_mup_wds_mlang_cond.py - Voice activity detection → Inference utilities: selects compute device
whisperspeech/vad.py - Whisper transcription → Voice activity detection: uses VAD
whisperspeech/wh_transcribe.py - Whisper transcription → Inference utilities: selects compute device
whisperspeech/wh_transcribe.py - Speaker embeddings → Voice activity detection: uses VAD
whisperspeech/extract_spk_emb.py - Speaker embeddings → Inference utilities: uses utilities
whisperspeech/extract_spk_emb.py - Semantic-token extraction → Semantic tokens: extracts tokens
whisperspeech/extract_stoks.py - Semantic-token extraction → VAD segment merging: uses merged segments
whisperspeech/extract_stoks.py - Text-model data prep → VAD segment merging: uses merged segments
whisperspeech/prepare_t2s_txts.py - Acoustic-model data prep → VAD segment merging: uses merged segments
whisperspeech/prepare_s2a_atoks.py - Model training → Neural building blocks: uses utilities
whisperspeech/train.py - Distributed training → Model testing: uses testing
whisperspeech/train_multi.py - Speech metrics → Semantic tokens: uses token model
whisperspeech/extract_metrics.py - Speech metrics → VAD segment merging: uses merged segments
whisperspeech/extract_metrics.py - Speech metrics → Inference utilities: uses utilities
whisperspeech/extract_metrics.py