Commit Graph
8 Commits
Author SHA1 Message Date
diodiogod 865b0e636d Add per-segment parameter switching to regular ChatterBox node (text and SRT)
Integrate segment parameter system with both traditional and streaming modes:
- Updated ChatterBoxTTSNode to parse text with parameters and apply them
- Added parameter switching in _process_languages_traditional method
- Updated ChatterBoxSRTTTSNode to extract and pass segment parameters
- Enhanced StreamingCoordinator to handle 5-tuple SRT data with parameters
- Parameters now override node defaults for specific segments only

This completes the per-segment parameter switching implementation for all
major TTS engines (VibeVoice, Index2, ChatterBox Official 23-Lang, ChatterBox).
2025-10-29 08:31:40 -03:00
diodiogod f8c2aa48cf Add per-segment parameter support to streaming pipeline
- Updated StreamingCoordinator to handle 5-tuple TTS data (idx, char, text, lang, params)
- Parameters stored in StreamingSegment metadata for transport through streaming
- ChatterBoxStreamingAdapter extracts and applies segment parameters during generation
- Streaming now supports the same per-segment parameters as traditional mode
- Backward compatible with existing 4-tuple format (no params)
2025-10-29 08:12:49 -03:00
diodiogod b9772e869b Fix audio segments/timings mismatch in SRT streaming
- Consolidate segments by subtitle_index to handle character changes within subtitles
- Multiple character segments within one subtitle are now concatenated into single audio
- Prevents 'Number of audio segments must match number of timings' error
- Fixes missing last subtitle in streaming mode timing reports
- Properly handles cases where segments are split by character tags like [Alice] within subtitles
2025-08-25 22:48:15 -03:00
diodiogod 6df656e702 Fix cache character parameter for language-only tags
Language-only tags like [de:] were still using resolved character alias
'david_attenborough cc3' instead of 'narrator' for cache keys. Fixed by
passing 'narrator' as character parameter to engine adapter when
original_character was 'narrator' (language-only tag).
2025-08-12 18:33:20 -03:00
diodiogod 77ccd9a5d9 Fix ChatterBox traditional method issues and enable cache sharing
Fixed two critical issues preventing cache sharing between streaming and traditional methods:

1. **Traditional method model debugging**: Added actual model state debugging to traditional SRT
   processing to show what model is really loaded (matching streaming debug output)

2. **Cache system unification**: Traditional method was using old cache system while streaming
   used new unified cache system, preventing cache hits between methods
   - Updated _generate_tts_with_pause_tags to use unified create_cache_function
   - Updated pause segment caching to use same unified system
   - Now both streaming and traditional methods share the same cache keys and storage

3. **Subtitle ordering fix**: Fixed streaming subtitle assembly order to use original subtitle_index
   from metadata instead of processing segment index, ensuring subtitles play in correct sequence

Results:
- Cache hits now work between streaming and traditional methods
- Consistent debugging output shows actual model state
- Proper subtitle ordering in streaming results
- Eliminates duplicate generation when switching between methods
2025-08-11 10:45:26 -03:00
diodiogod 8e6e83e8bb Fix ChatterBox SRT duplicate model loading and default voice handling
- Move smart initialization to traditional processing only (batch_size=0/1)
- Skip duplicate model loading in streaming mode (batch_size>1)
- Fix default voice handling: use None instead of 'none' string for ChatterBox
- Streaming now uses only efficient pre-loading system
- Traditional mode preserves VRAM-efficient sequential loading
2025-08-10 12:29:26 -03:00
diodiogod 2f36474aee Fix ChatterBox universal streaming data format and validation issues
- Fix data unpacking error: convert 3-tuple (char, text, lang) to 4-tuple (idx, char, text, lang) format
- Fix empty segments validation in LanguageGroup and CharacterGroup creation
- Initialize groups with first segment instead of empty list to prevent __post_init__ validation errors
- ChatterBox TTS Text streaming now works properly with universal streaming system
2025-08-10 12:12:00 -03:00
diodiogod 5308ba8d5a Implement universal streaming system architecture
- Create universal streaming module in utils/streaming/
- Implement StreamingCoordinator to replace all format-specific routers
- Create universal StreamingSegment data structure (no more format conversions)
- Implement UniversalWorkQueueProcessor for engine-agnostic parallel processing
- Add ChatterBox streaming adapter preserving all existing functionality
- Add F5-TTS streaming adapter with language model switching support
- Document complete streaming integration plan in F5TTS_STREAMING_INTEGRATION_PLAN.md

This creates the foundation for eliminating the current spaghetti code where
each node type needs its own router and format conversions. The universal
system works with any engine through adapters while preserving all existing
functionality.
2025-08-10 11:30:44 -03:00