Commit Graph
11 Commits
Author SHA1 Message Date
diodiogod edbcb3422d Fix VibeVoice multi-character switching and pause tag support
Major fixes for VibeVoice engine functionality:

Audio Quality Improvements:
- Replace linear interpolation resampling with librosa.resample (matches official)
- Fix normalization to use -25 dB FS RMS instead of peak normalization (matches official)
- Implement proper stereo-to-mono conversion with channel averaging (matches official)

Multi-Character Voice Switching:
- Add proper character mapping using get_character_mapping() like F5-TTS does
- Build complete voice_mapping with fallbacks for all parsed characters
- Fix character parser to auto-discover characters when available_characters is None
- Remove unnecessary fallback logic from processor (handled at wrapper level)

Pause Tag Support:
- Add modular pause tag processing like F5-TTS using generate_vibevoice_with_pause_tags()
- Integrate PauseTagProcessor for [pause:X] support in VibeVoice
- Follow established modular pattern from F5-TTS and ChatterBox implementations

Cache System Improvements:
- Fix floating point precision issues in cache key generation (round to 3 decimals)
- Add proper parameter propagation to cached engine instances
- Ensure cache keys include all generation parameters properly

All changes tested and working - multi-character switching now works correctly
and pause tags are processed properly using the modular system.
2025-08-29 09:01:25 -03:00
diodiogod 8a0bcd7e97 Remove Higgs Audio voice_preset system and improve reference text handling
Major refactoring to simplify Higgs Audio voice system and fix reference text usage:

### Voice Preset System Removal:
- Remove voice_preset parameter from engine node, adapter, and core engine
- Remove load_voice_presets() and get_voice_preset_path() methods
- Remove voice preset validation and fallback logic
- Convert JSON voice config to standard .wav + .txt files

### Reference Text Fixes:
- Fix character mapping to use f5tts engine type for proper text loading
- Characters now use their own reference text files (not narrator fallback)
- Only narrator voice uses narrator reference text (logical consistency)
- Add comprehensive reference text debugging to console logs

### Parameter Improvements:
- Update defaults based on user testing: temp 0.8, top_p 0.6, top_k 80
- Allow max_new_tokens minimum of 1 for complete flexibility
- Update tooltips to reflect new recommended values

### Console Log Cleanup:
- Consolidate verbose character loading messages
- Show reference text usage clearly without technical clutter
- Replace tensor shape logs with duration-based messages

### Narrator Fallback Hierarchy:
- Priority 1: opt_narrator (Character Voices node)
- Priority 2: narrator_voice dropdown
- Priority 3: Mapped narrator (David Attenborough from alias map)
- Priority 4: None (basic TTS)

This significantly improves voice cloning quality and system consistency.
2025-08-20 21:30:59 -03:00
diodiogod 4393568e53 Add Higgs Audio 2 engine integration with voice cloning
- Implement complete Higgs Audio 2 TTS engine with voice cloning capabilities
- Add minimal essential dependencies: descript-audio-codec, vector_quantize_pytorch
- Create modular engine architecture following established patterns:
  * engines/higgs_audio/higgs_audio.py - Main engine wrapper (688 lines)
  * engines/higgs_audio/higgs_audio_downloader.py - Model downloader (357 lines)
  * engines/adapters/higgs_audio_adapter.py - Unified adapter (363 lines)
  * nodes/engines/higgs_audio_engine_node.py - Configuration node (153 lines)
- Copy boson_multimodal modules from reference implementation
- Use unified ImprovedChatterBoxChunker instead of custom chunking for consistency
- Integrate with existing cache system and unified downloader
- Add 8 voice presets (belinda, en_woman, en_man, etc.) in voices_examples/
- Support both preset voices and custom reference audio for cloning
- Enable chunking for unlimited length text generation
- Follow F5-TTS implementation patterns for consistency

Features:
- High-quality voice cloning from 30+ second reference audio
- Multi-language support (English, Chinese dialects)
- Configurable generation parameters (temperature, top_p, top_k)
- Automatic model downloading to organized TTS/HiggsAudio/ structure
- Proper caching integration for performance
- Character-based chunking with silence insertion between chunks
2025-08-18 13:49:45 -03:00
diodiogod 6e677295ff Version 4.2.3: Fix critical character language resolution and console logging bugs 2025-08-08 21:18:14 -03:00
diodiogod 11f0088445 Implement language-aware character switching with cache optimization
- Add [language:character] syntax support for multilingual TTS
- Implement language model switching for F5-TTS and ChatterBox
- Add cache optimization to skip model loading when all segments cached
- Fix character parser setup order to ensure proper character recognition
- Add pause tag awareness to cache pre-checking
- Support language defaults in character alias files
- Update documentation with language switching examples
2025-08-02 08:50:46 -03:00
diodiogod 62c71edb50 Version 3.1.3: Fix ChatterBox character switching crashes with short text segments
- Fixed ChatterBox sequential generation bug causing CUDA tensor indexing crashes
- Added dynamic space padding for short text segments in character switching mode
- Space padding preserves speech quality while providing sufficient tokens
- Improved version bump script to prevent downgrade attempts
2025-07-18 02:18:54 -03:00
diodiogod 40359f08d5 Clean up console output for better user experience
- Comment out successful character alias resolution messages
- Make character voice and cache messages mutually exclusive
- Suppress F5-TTS debug output while preserving progress bars
- Implement unified generation messages with character info:
  - Narrator: 📺 Generating SRT segment X/Y (Seq Z)...
  - Characters: 🎭 Generating SRT segment X/Y (Seq Z) using 'character_name'
- Remove redundant 'main voice' messages for cleaner output
2025-07-17 23:08:17 -03:00
diodiogod f6dc5e595f Version 3.1.2
Implement user-friendly character alias system with #character_alias_map.txt file
Support flexible alias formats: 'Alias = Character' and 'Alias[TAB]Character' with smart parsing
Add comprehensive alias documentation to CHARACTER_SWITCHING_GUIDE.md with examples
Update README features to highlight new alias system and improve emoji clarity
Replace old JSON character_alias_map.json with more accessible text format
Maintain backward compatibility with existing JSON files for seamless migration
2025-07-17 21:50:30 -03:00
diodiogod 1ee9bfd6f8 Version 3.1.1
Fix character discovery system to use filename-based character names instead of folder names
Folders now used for organization only, improving usability and clarity
Update character switching documentation to reflect new system
2025-07-17 21:18:10 -03:00
diodiogod 2a2135b4b3 Add comprehensive character switching system with alias mapping
- Implement universal character parsing for [Character] tags in text
- Add voice discovery system with flat file and folder structure support
- Integrate character switching into all TTS nodes (F5TTS, ChatterBox, SRT)
- Add character alias mapping system with JSON configuration files
- Support both models/voices/ and voices_examples/ directories with priority
- Preserve line-by-line processing in SRT mode for natural narrator fallback
- Maintain all existing functionality including chunking and caching systems
- Add robust fallback system for missing characters
- Include comprehensive user guide and documentation

Features:
- Use [CharacterName] tags to switch voices seamlessly
- Character aliases: map "Bob" -> "Clint_Eastwood CC3 (enhanced2)"
- Automatic voice discovery from file structure
- Works with both F5TTS (audio+text) and ChatterBox (audio-only) engines
- SRT subtitle support with character switching
- Graceful fallback to narrator voice for unknown characters
- Performance optimized with character-aware caching
2025-07-17 08:38:26 -03:00
diodiogod 84083be060 Add enhanced voice discovery system with dual folder support
- Support both models/voices/ and voices_examples/ folders
- Smart text file priority: .reference.txt > .txt for F5-TTS reference text
- Recursive folder scanning with performance caching
- Update F5TTS nodes to use new voice discovery system
- Maintain backward compatibility with existing voice files
2025-07-15 15:10:41 -03:00