Commit Graph
4 Commits
Author SHA1 Message Date
diodiogod fff23447f0 Analyzer: analyze in mono but preserve original stereo in output
- _extract_audio_tensor now returns both original and mono versions
- Analysis (silence detection, energy, peaks) performed on MONO version only
- Visualization and graphs generated from MONO version
- Output audio (processed and segmented) uses ORIGINAL stereo format
- Timing regions found from mono are applied directly to stereo samples
- Stereo audio now passes through analyzer without quality loss
- Segmented audio preserves stereo channel information
2025-10-29 15:08:18 -03:00
diodiogod f58bf7d560 Version 4.6.28
Fix VideoHelper audio compatibility with universal normalizer

Technical implementation:
- Add _get_audio() method to BaseChatterBoxNode for universal audio format handling
- Update Voice Changer, Merge Audio, and ChatterBox VC nodes to use normalizer
- Centralize audio input processing in AudioProcessingUtils.normalize_audio_input()
- Support VideoHelper LazyAudioMap, Character Voices, and standard AUDIO formats
- Maintain backward compatibility with existing workflows

Fixes issue #32: VideoHelper Suite audio inputs now work with all audio-processing nodes
2025-09-03 23:24:47 -03:00
diodiogod c45c98f3e9 Fix CUDA device compatibility issues for ComfyUI video nodes
- Add CPU conversion for all audio outputs to prevent device mismatch errors
- Ensure float32 dtype for ComfyUI video node compatibility
- Fix tensor device issues in silence detection and audio analysis
- Maintain audio quality while ensuring ComfyUI core node compatibility

Changes:
- AudioProcessingUtils.format_for_comfyui: Add .cpu() and .float() conversion
- BaseChatterBoxNode.generate_stable_audio_component: Add device/dtype handling
- AudioProcessingUtils.detect_silence: Fix device parameter for torch.tensor
- AudioAnalyzer.analyze_audio: Add .cpu() before .numpy() conversion

Resolves "can't convert cuda:0 device type tensor to numpy" and
"Expected numpy array with dtype float32 but got float64" errors.
2025-08-15 00:32:46 -03:00
diodiogod b21d0212fb Major refactoring: Reorganize project structure for better maintainability
🔧 ENGINES SEPARATION:
- Move chatterbox/ → engines/chatterbox/ (TTS/VC engine + models)
- Move chatterbox/f5tts/ → engines/f5tts/ (F5-TTS engine)
- Move adapters/ → engines/adapters/ (engine adapters for multilingual system)

📁 NODES ORGANIZATION:
- Create nodes/chatterbox/ for ChatterBox nodes (TTS, VC, SRT)
- Create nodes/f5tts/ for F5-TTS nodes (TTS, SRT, Edit, Options)
- Create nodes/audio/ for audio processing nodes (analyzer, recorder)
- Create nodes/base/ for base classes
- Rename node files for clarity (tts_node.py → chatterbox_tts_node.py)

🗂️ UTILITIES RESTRUCTURE:
- Replace core/ with organized utils/ structure
- utils/audio/ - Audio processing, analysis, caching
- utils/text/ - Text processing, character parsing, chunking
- utils/voice/ - Voice discovery, multilingual engine
- utils/timing/ - SRT timing logic (from chatterbox_srt/)
- utils/models/ - Model management (ChatterBox + F5-TTS)
- utils/system/ - System utilities, import management

🔄 IMPORT PATH UPDATES:
- Update all import paths to use new organized structure
- Fix lazy imports in nodes for runtime compatibility
- Restore missing F5-TTS edit engine from git history
- Fix path resolution for voice discovery and character aliases

🎯 KEY IMPROVEMENTS:
- Engine-centric organization with clear separation
- Purpose-driven folder grouping for better navigation
- Self-documenting file names indicating ownership
- Scalable structure for future engine additions
- Maintains backward compatibility for existing workflows

All 10 nodes loading successfully with complete functionality preserved.
2025-08-02 18:50:26 -03:00