Major Features: • IndexTTS-2 engine with zero-shot voice cloning and emotion control • Multi-modal emotion support (audio refs, text descriptions, manual vectors) • Character switching with emotion references: [Alice:angry_bob] • Native IndexTTS-2 token-based chunking integration • Comprehensive parameter exposure with 25+ engine-specific options Core Components: • engines/processors/index_tts_processor.py - Main processor with emotion support • nodes/engines/index_tts_engine_node.py - Engine configuration node • Updated unified TTS Text node with IndexTTS-2 integration • Node registration in main nodes.py Dependencies: • Added 8 safe IndexTTS-2 dependencies to install.py and requirements.txt • Dependency testing confirmed only descript-audiotools conflicts (already handled) • All new deps use flexible versioning (>=) to avoid lock conflicts Character Parser Fix: • Fixed circular import by moving CharacterSegment to separate types.py • Maintains backward compatibility while supporting emotion references • Modular structure preserved (4 modules under 500 lines each) Technical Details: • Emotion disentanglement separates speaker identity from emotional expression • Supports [character:emotion] syntax for per-segment emotion control • IndexTTS-2 native chunking overrides character-based chunking when enabled • Full caching integration and pause tag support included • Error handling with graceful fallbacks for missing voices/emotions
25 lines
768 B
Python
25 lines
768 B
Python
"""
|
|
Character Parser Module - Modular text processing for TTS engines
|
|
|
|
This module provides unified character tag parsing with emotion support for all TTS engines.
|
|
Backward compatible with existing CharacterParser usage.
|
|
"""
|
|
|
|
# Import all classes and functions from the modular structure
|
|
from .types import CharacterSegment
|
|
from .base_parser import CharacterParser
|
|
from .validation import validate_character_text
|
|
|
|
# Global instances for backward compatibility
|
|
from .base_parser import character_parser
|
|
|
|
# Convenience functions for backward compatibility
|
|
from .base_parser import parse_character_text
|
|
|
|
__all__ = [
|
|
'CharacterParser',
|
|
'CharacterSegment',
|
|
'character_parser',
|
|
'parse_character_text',
|
|
'validate_character_text'
|
|
] |