Commit Graph
9 Commits
Author SHA1 Message Date
diodiogod 309f00a707 Version 4.25.18
Fix Echo-TTS character voice file-path fallback and compressed audio loading

Technical details:
- Preserve Character Voices and dropdown audio_path fallback in Echo-TTS voice mapping
- Allow Echo-TTS narrator and character fallback to use file paths when decoded tensors are unavailable
- Expand safe audio loading fallback order to support OGG and other compressed formats when torchaudio fails
2026-04-17 00:32:32 -03:00
diodiogod 76b0818d7c Version 4.19.4
Fix F5-TTS restore tag audio dimension handling

Technical details:
- Fix 1D tensor error in ChatterBox VC when processing F5-TTS output
- Centralize audio normalization in AudioProcessingUtils.save_audio_to_temp_file()
- Replace manual dimension handling with centralized function in chatterbox_vc_node.py
- Add 1D to 2D tensor conversion for torchaudio.save() compatibility
2026-01-28 12:52:53 -03:00
tazztone 3dc455e565 Fixed 4 failing tests by:
Correcting test assertions for create_silence (returns 1D for mono)
Correcting test assertions for normalize_audio_tensor (keeps 1D as 1D)
Fixed production bug in pad_audio_to_duration - silence tensor dimensions didn't match input audio
2025-12-18 22:13:34 +01:00
diodiogod 58f4b52c34 Centralize PyTorch 2.9 audio normalization in safe_load_audio utility
Move int16 to float [-1, 1] normalization from Character Voices node into
the safe_load_audio() utility function so ALL engines benefit from the fix.

Changes:
- safe_load_audio() now normalizes int16 values to [-1, 1] range automatically
- Handles PyTorch 2.9 torchaudio.load() behavior change and scipy fallback
- Remove duplicate normalization from Character Voices node
- F5-TTS now uses safe_load_audio() instead of torchaudio.load() directly

This fixes TorchCodec DLL errors on ALL engines that load audio files with PyTorch 2.9,
not just Character Voices. F5-TTS, ChatterBox, and future engines all benefit.
2025-11-07 03:00:28 -03:00
diodiogod 46fda45944 Fix: Remove torchcodec dependency to eliminate FFmpeg system requirement
Removed torchcodec from requirements.txt and install.py to eliminate the FFmpeg
system dependency that was causing Windows installation failures.

Implementation:
- Removed torchcodec>=0.2.0 from requirements.txt
- Removed torchcodec>=0.2.0 from install.py core_packages list
- Removed torchaudio 2.9+ migration warnings (no longer applicable)
- Added AudioProcessingUtils.safe_load_audio() utility for robust audio loading
- Updated all audio loading calls to use fallback-aware utility function

Audio Loading Changes:
- character_voices_node.py: Uses safe_load_audio() with fallback support
- tts_text_node.py: Uses safe_load_audio() for narrator and character voices (2x)
- tts_srt_node.py: Uses safe_load_audio() for narrator voice
- higgs_audio_tts_processor.py: Uses safe_load_audio() (2x)
- higgs_audio_srt_processor.py: Uses safe_load_audio() (2x)
- index_tts_processor.py: Uses safe_load_audio() (2x)
- f5tts_streaming_adapter.py: Uses safe_load_audio()
- higgs_audio_adapter.py: Uses safe_load_audio()
- subprocess.py: Uses safe_load_audio()

Compatibility:
- torchaudio.load() works fine with fallback backends (soundfile, scipy)
- No quality loss - only negligible audio loading speed difference (~milliseconds)
- All existing audio formats supported
- Better error handling with graceful fallbacks
2025-11-05 22:26:10 -03:00
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