-
Refactor code for improved readability and performance across multiple modules
-
Convert IndexTTS to pure Rust implementation
Claude
Complete rewrite of IndexTTS from Python to Rust for maximum performance:
Core Features:
- Audio processing with mel-spectrogram computation using RealFFT
- STFT/iSTFT implementation with proper windowing
- Mel filterbank creation with triangular filters
- Audio I/O for WAV files using hound
- Sample rate resampling with rubato
Text Processing:
- Text normalization (Chinese/English punctuation handling)
- BPE tokenization with vocabulary support
- Phoneme conversion system
- Multi-language detection (Chinese, English, Mixed)
Model Inference:
- ONNX Runtime integration with session management
- Speaker encoder for voice cloning
- Emotion encoder with 8-dimensional control
- Semantic encoder for audio codes
- GPT model wrapper with sampling strategies
Vocoder:
- BigVGAN neural vocoder (fallback implementation)
- Snake activation functions for neural synthesis
- Griffin-Lim as simple fallback vocoder
Pipeline:
- Complete TTS synthesis orchestration
- Configurable synthesis options
- …