Commit Graph
79 Commits
Author SHA1 Message Date
diodiogod 4a99f15851 Add audio.cpp TTS engine integration 2026-08-12 11:50:10 -03:00
diodiogod 2bc4c2a18d Add IndexTTS 2.5 support 2026-08-11 23:08:35 -03:00
diodiogod 517d11ed4c Add DramaBox and ChatterBox V3 support
- Integrate DramaBox with unified TTS and SRT generation, duration targeting, prompt templates, memory strategies, FP8, compile, and silence diagnostics
- Add ChatterBox 23-Lang V3 checkpoint support and artifact handling
- Extend parameter switching, generated-audio caching, tag editor controls, model downloads, and engine registration
- Add user documentation, engine metadata, generated comparison tables, and FL-MCP launcher reliability updates
2026-07-25 11:38:52 -03:00
diodiogod 0ea124a1c0 Add neg alias for negative prompts 2026-07-17 01:34:40 -03:00
diodiogod ccbc721c2d Improve sound effect timeline handling and compile caching 2026-07-17 01:33:18 -03:00
diodiogod 4ccc0aa5ee Unify Hugging Face download output 2026-07-15 22:52:14 -03:00
diodiogod a68bafb73f Ignore automatic Fish language prompt tags 2026-07-15 21:41:29 -03:00
diodiogod 068c3f1f1e Add IndexTTS-2 inline emotion controls 2026-07-10 23:21:53 -03:00
diodiogod 1218e01683 Fix OmniVoice tag handling to follow suite syntax 2026-07-07 00:13:19 -03:00
diodiogod 9081d3c22a Add Fish Audio S2 engine and fix VibeVoice speaker remap 2026-07-06 23:35:13 -03:00
diodiogod af13209b47 Add OmniVoice engine with native SRT duration targeting 2026-06-18 22:23:32 -03:00
diodiogod cb6dfe3a11 Add Dots TTS engine integration 2026-06-14 15:27:58 -03:00
diodiogod 9cb78c3157 Finalize Higgs Audio v3 transformers 5 integration 2026-06-11 01:16:55 -03:00
diodiogod 2bf402d9a5 Fix Higgs v3 character mapping and ChatterBox SRT cache key 2026-06-10 00:40:38 -03:00
diodiogod 2b69130a42 Add MOSS-TTS engine family with native TTSD support (#295)
* docs: add new engine integration guide flow

* docs: link new engine guide navigation

* docs: clarify SRT is required for TTS engines

* docs: document SRT reuse of TTS processor

* docs: move new engine guide link below timeline

* Add MOSS-TTS engine integration

* docs: add reference input mode to engine research

* Add MOSS-TTS engine checkpoint

* Refine MOSS prompt fields and parameter switching

* Refine MOSS prompt field warnings and caching

* Improve MOSS inline edit handling and VRAM handoff

* Improve MOSS native dialogue mapping and UI

* docs: add long-form model analysis and VibeVoice reference

* Improve MOSS TTSD chunking, interrupts, and SRT mapping

* Refine MOSS mapping, device checks, and metadata

* Make MOSS native incompatibilities hard-fail

* Document MOSS native hard-fail compatibility rules
2026-05-18 16:42:53 -03:00
diodiogod 2add12df54 Version 4.25.12
Fix Higgs Audio compatibility with latest upstream model release

Technical details:
- Restore CharacterParser language display helper after parser modularization
- Add compatibility shim for flat Higgs Audio v2 Hugging Face config schema
- Add loader diagnostics for legacy and v2 Higgs config detection
2026-04-12 11:19:30 -03:00
diodiogod 3434f1de0d Refine subtitle building and punctuation cleanup 2026-03-17 17:47:37 -03:00
diodiogod 1653c689e5 Add standalone ASR punctuation and auxiliary model registry
Implementation details:
- add a standalone punctuation/truecase text node for raw ASR transcripts
- create a separate auxiliary-model YAML source of truth and docs generator
- register punctuation helper models outside the engine registry
- add lazy local download/runtime support for punctuators-backed ONNX models
- document auxiliary model sources and layouts for future helper-model expansion
2026-03-17 10:17:47 -03:00
diodiogod da9310e814 Version 4.22.5
Adjust ChatterBox Official 23-Lang Russian stress install flow

Technical details:
- move patched russian-text-stresser installation back to install.py
- keep only the large Russian dictionary as lazy runtime data downloaded through the unified downloader
- stop runtime package mutation during generation and warn users to rerun install if the package is missing
- preserve the safetensors fallback log cleanup from the previous patch
2026-03-10 23:08:17 -03:00
diodiogod 413ac911dc Version 4.22.4
Fix ChatterBox Official 23-Lang Russian stress support

Technical details:
- Add lazy Russian stress setup for Official 23-Lang instead of eager installer downloads
- Download Russian stress dictionary through the unified downloader into the TTS model cache
- Install patched russian-text-stresser only on first Russian use with broad dependency constraints
- Accept safetensors fallbacks in Official 23-Lang completeness checks and loader logs
- Remove misleading missing-file warnings for working safetensors model folders
2026-03-10 22:58:16 -03:00
drphero 738f9316bf feat: improve echo-tts parity and stability
- add parameter switching + pause/edit tag handling
- enforce [S1] prompt normalization
- improve narrator/character voice routing
- error on pause tags with speaker KV
2026-03-01 00:44:19 -03:00
diodiogod 1a17d4510d Version 4.21.2
Suppress language auto-switching logs for VibeVoice/KugelAudio

Technical changes:
- Add optional engine_type parameter to parse_text_segments() method
- Update VibeVoice processor and unified TTS node to pass engine_type
- Update parse_character_text() convenience function to support engine_type
- Suppress language logs when engine_type is vibevoice or kugelaudio
2026-02-14 11:28:51 -03:00
diodiogod b13ec81872 Version 4.19.1
Add CosyVoice3 <restore> tag support

Technical implementation:
- Add extract_restore_tags_only() function to filter only restore tags
- Integrate EditPostProcessor into CosyVoice processor
- Preserve CosyVoice native paralinguistic tags (<breath>, <laughter>, etc.)
- Apply ChatterBox VC restoration after TTS generation
- Block Step Audio EditX emotion/style/speed/paralinguistic tags
2026-01-28 11:43:23 -03:00
diodiogod 88feb3a99a Add Qwen3-TTS engine with Phase 1 implementation
Implements complete Qwen3-TTS integration following NEW_ENGINE_IMPLEMENTATION_GUIDE
with unified architecture, character switching, language support, and Voice Designer.

## Core Engine Implementation

**Engine Wrapper** (`engines/qwen3_tts/qwen3_tts.py`):
- Wraps official Qwen3-TTS implementation with .to() method for VRAM management
- Device checking before generation with automatic model reload
- Support for 3 model types: CustomVoice (presets), VoiceDesign (text-to-voice), Base (voice cloning)
- Progress bar integration via transformers streamer interface
- 24kHz mono audio output in ComfyUI-compatible format

**Bundled Implementation** (`engines/qwen3_tts/impl/`):
- Official Qwen3-TTS library bundled for stability
- Patched modeling_qwen3_tts.py (line 2069) for progress callback support
- Sox dependency stubbed out (25Hz models only, we use 12Hz)
- Supports 6 models: 0.6B/1.7B × CustomVoice/VoiceDesign/Base

**Adapter** (`engines/adapters/qwen3_tts_adapter.py`):
- Intelligent model selection based on context (voice_preset/node_type)
- Automatic switching: preset→CustomVoice, None→Base, Designer→VoiceDesign
- Full caching integration with audio_cache.generate_cache_key()
- Voice reference processing for Base model (audio + transcript)
- Character-to-speaker mapping for CustomVoice presets (deterministic MD5 hashing)

## Node Implementation

**Engine Configuration Node** (`nodes/engines/qwen3_tts_engine_node.py`):
- Unified interface with voice_preset dropdown (9 preset speakers + None for zero-shot)
- Model size selection: 0.6B (low VRAM) / 1.7B (high quality)
- Language dropdown: Auto + 10 languages (Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian)
- Conditional instruction field (locked when unsupported: Base model or 0.6B CustomVoice)
- Generation parameters: top_k, top_p, temperature, repetition_penalty, max_new_tokens
- Advanced: dtype, attn_implementation, x_vector_only_mode

**Voice Designer Node** (`nodes/qwen3_tts/qwen3_tts_voice_designer_node.py`):
- UNIQUE FEATURE: Create voices from natural language descriptions
- Smart disk check: loads existing characters without model loading/generation
- Runtime caching for same-session regeneration optimization
- Saves to models/voices/ with standard format (.wav + .reference.txt + .txt metadata)
- Outputs unified NARRATOR_VOICE format matching Character Voices node
- Duplicate detection prevents regenerating identical voices

**TTS Processor** (`nodes/qwen3_tts/qwen3_tts_processor.py`):
- Full character switching support via character parser
- CustomVoice: deterministic character→preset mapping (preserves narrator's chosen preset)
- Base: uses models/voices/ audio references (standard voice cloning)
- VoiceDesign: uses saved voice descriptions from Designer node
- Pause tag processing with silence generation
- Language switching support via [language:Character] tags
- Segment parameter support ([seed:X], [temperature:0.8])
- Interrupt handling for cancellation
- Chunk combining with ChunkCombiner + ChunkTimingHelper

## JavaScript Widget

**Widget Locking** (`web/qwen3_tts_widgets.js`):
- Conditional UI: locks instruction field when unsupported
- Locked when: voice_preset="None" OR (model_size="0.6B" + preset selected)
- Console warnings explain limitations
- Preserves field value when locked (doesn't clear)

## System Integration

**Language Support** (`utils/models/language_mapper.py`):
- Added QWEN3_TTS_LANGUAGE_MAP: maps ISO codes to full names (e.g., "po"→"Portuguese")
- Added map_language_code_to_qwen3_tts() helper function
- Added "po" to global LANGUAGE_ALIASES (maps to pt-pt)
- Qwen3-TTS expects FULL language names, not ISO codes

**Unified Model Interface** (`utils/models/unified_model_interface.py`):
- Registered qwen3_tts factory in initialize_all_factories()
- Consolidated loading messages (single-line model loading output)
- Context-based model selection (VoiceDesign/CustomVoice/Base)

**Segment Parameters** (`utils/text/segment_parameters.py`):
- Added "qwen3_tts" to PARAMETER_ENGINES for inline tag support

**Voice Discovery** (`utils/voice/discovery.py`):
- Enhanced get_character_mapping() to detect VoiceDesign saved voices
- Checks for voice metadata format (description vs audio reference)
- Returns voice type for processor to handle correctly

**TTS Text Node** (`nodes/unified/tts_text_node.py`):
- Added qwen3_tts processor routing
- CustomVoice console messages (shows preset speaker instead of narrator warning)
- Recognizes unified NARRATOR_VOICE format from Voice Designer
- Language code mapping display (shows "po" → "Portuguese" conversion)

**Node Registration** (`nodes.py`):
- Registered Qwen3TTSEngineNode and Qwen3TTSVoiceDesignerNode
- Added error handling with fallback messages

## Features Implemented (Phase 1 Complete)

✅ Basic engine integration with unified architecture
✅ Character switching (CustomVoice presets + Base model cloning)
✅ Language switching (10 languages + Auto detection)
✅ Pause tags ([pause:1.5])
✅ Segment parameters ([seed:42], [temperature:0.8])
✅ Audio caching (prevents duplicate generation)
✅ VRAM management (.to() method + device checking)
✅ Interrupt handling (user cancellation)
✅ Progress bars (console + ComfyUI)
✅ Voice Designer (text-to-voice creation)
✅ Smart disk caching (skips regeneration for saved voices)
✅ Unified NARRATOR_VOICE output format

## Technical Details

- **Sample Rate**: 24kHz mono
- **Models**: 6 variants (0.6B/1.7B × CustomVoice/VoiceDesign/Base)
- **Tokenizer**: Qwen3-TTS-Tokenizer-12Hz (12.5 fps, 16 quantizers)
- **Languages**: 10 (Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian)
- **CustomVoice Presets**: 9 (Vivian, Serena, Uncle_Fu, Dylan, Eric, Ryan, Aiden, Ono_Anna, Sohee)
- **Audio Format**: torch.Tensor [1, 1, samples] at 24kHz
- **Cache Integration**: Uses audio_cache with stable key generation
- **Character Mapping**: MD5-based deterministic assignment (cache-friendly)

## Testing Completed

- Engine node loads and configures correctly
- Preset voice generation (CustomVoice with 9 speakers)
- Zero-shot cloning (Base model with voice references)
- Voice Designer text-to-voice generation
- Character switching with automatic preset mapping
- Pause tags create correct silence durations
- Language selection and switching
- Caching prevents duplicate generation
- VRAM management (Clear VRAM + reload)
- Generation info reports with timing
- Interrupt cancellation
- Widget locking behavior
- Disk check optimization (skips model loading for existing voices)

## Phase 2+ (Future)

- SRT processor integration (Phase 4)
- Streaming generation (requires special deployment)
- Fine-tuning nodes (advanced feature)
2026-01-28 00:02:02 -03:00
diodiogod a58c68d575 Add parameter switching support to CosyVoice3
Implemented per-segment parameter overrides for seed and speed:
- Register CosyVoice in segment_parameters.py for seed and speed
- Apply segment.parameters using modular apply_segment_parameters()
- Extract segment_seed and segment_speed with fallback to node defaults
- Pass parameters through all generation paths (pause tags, chunking, direct)
- Add speed parameter to _generate_audio_segment() method
- Print parameter application message matching other engines

Supports inline tags like [Alice|seed:42|speed:1.5] with automatic
warnings for unsupported parameters via modular validation system.
2025-12-29 16:11:10 -03:00
diodiogod 7a6d6ca77d Add language switching support to CosyVoice processor
- Prepend CosyVoice native language tags (<|en|>, <|zh|>, <|ja|>, <|ko|>) based on segment language
- Integrate with unified language system using resolve_language_alias()
- Support both explicit [lang:] tags and character language defaults
- Validate manual language tags to avoid duplicates
- Only prepend if no valid CosyVoice language tag already present
2025-12-29 15:37:08 -03:00
diodiogod 1813a439cf Fix CosyVoice wrapper tag conversion order
Swap tag conversion order to prevent conflicts:
- Single tags converted first: <laughter> → [laughter]
- Wrapper tags converted last: <laughing>text</laughing> → <laughter>text</laughter>

This prevents the single tag pattern from breaking wrapper conversions.
2025-12-29 14:24:59 -03:00
diodiogod 94b6f17d89 Fix CosyVoice special tags support and add text display
Fixed issues:
1. Special tags were being stripped by text_frontend normalization
2. No differentiation between single tags and wrapper tags

Solutions:
- Auto-detect special tags in text and set text_frontend=False to preserve them
- Added wrapper tag conversion: <laughing>text</laughing> → <laughter>text</laughter>
- Improved single tag pattern to avoid matching wrapper opening tags
- Added text display with separators like Step Audio EditX

Tag support:
- Single tags: <cough>, <breath>, <laughter>, etc. → [cough], [breath], [laughter]
- Wrapper tags: <laughing>text</laughing> → <laughter>text</laughter>
- Emphasis: <strong>text</strong> (already correct format, unchanged)
- Language: <|en|>, <|zh|>, <|ja|>, <|ko|> (detected and preserved)

Files modified:
- engines/cosyvoice/cosyvoice.py: Tag detection, text_frontend control, text display
- utils/text/cosyvoice_special_tags.py: Improved tag conversion logic

Example output:
📝 CosyVoice3 - Generating zero_shot:
============================================================
On Tuesdays, the pigeons held parliament. [cough] They debated...
============================================================
⚙️  text_frontend=False (special tags detected)
2025-12-29 14:04:48 -03:00
diodiogod 4265a5e8c1 CosyVoice3: Complete implementation fixes and dependency cleanup
- Implement auto-mode detection (zero_shot/instruct/cross_lingual)
- Remove mode dropdown and reference_text from engine node
- Fix sample rate from 22050 Hz to 24000 Hz across all files
- Add paralinguistic tag conversion (<tag> to [tag]) via cosyvoice_special_tags.py
- Clean up requirements.txt (remove 13 unnecessary deps, keep only inflect)
- Update engine node tooltip with clear mode mutual exclusivity warning

All dependencies now properly handled by install.py except inflect (needed for text normalization)
2025-12-29 01:14:26 -03:00
diodiogod 91105aa793 Fix Step Audio EditX local model path resolution
- Filter engine node dropdown to only show valid Step Audio EditX models (those with CosyVoice vocoder)
- Prevents internal components like FunASR-Paraformer from appearing in model selection
- Add proper 'local:' prefix handling in adapter to resolve model paths correctly
- Respects extra_model_paths.yaml configuration for yaml-configured paths
- Fixes error when selecting 'local:Step-Audio-EditX' from dropdown
2025-12-08 22:08:20 -03:00
diodiogod 7d3b171ab3 Add voice restoration with iteration reference support
New Feature: <restore:N@M> Syntax
- <restore> - Restore using original pre-edit audio (1 VC pass)
- <restore:N> - N VC passes using original audio as reference
- <restore:N@M> - N VC passes using audio from iteration M as reference

Implementation:
- Store audio snapshots after each edit iteration
- Parse iteration reference from @ syntax in restore tags
- Use specified iteration audio as VC reference instead of original
- Allows preserving partial effects (e.g., keep whisper, remove laughter)

Use Case Example:
<style:whisper:2> <Laughter:3> <restore:1@2>
- Applies whisper (iterations 1-2)
- Applies laughter (iterations 3-5)
- Restores using iteration 2 (whispered audio) with 1 VC pass
- Result: Keeps whisper effect but removes laughter voice degradation

Documentation:
- Updated INLINE_EDIT_TAGS_USER_GUIDE.md with restore tag section
- Added examples for basic and iteration-reference restoration
- Explained use cases and when to use each syntax
- Updated processing order and reference sections
2025-12-08 20:04:39 -03:00
diodiogod 2a2b096e45 Fix inline edit tag position tracking with space collapsing and improve progress display
Position Tracking Fixes:
- Adjust tag positions after multiple spaces are collapsed to single space
- Track cumulative position shifts from space collapsing operations
- Add space-before logic when reinserting paralinguistic tags
- Ensure proper spacing on both sides of reinserted tags (support <Laughter> hahaha)

Display Improvements:
- Show clean transcript instead of raw tag syntax in edit post-processor
- Add suppress_progress parameter to Step Audio EditX Audio Editor node
- Suppress redundant "Edit iteration 1/1" messages when called from edit_post_processor
- Edit post-processor already shows clear iteration progress (→ Iteration X/Y)

Fixes issues with:
- Tags inserted at wrong positions when separate tags create multiple spaces
- Tags glued to words without spacing (support<Laughter> instead of support <Laughter>)
- Confusing duplicate iteration progress messages
2025-12-08 19:40:36 -03:00
diodiogod 485736bc89 Fix pause tag segmentation and inline edit tag position tracking
- Refactor pause processing to return separate segments instead of combined audio
- Apply edit post-processing to individual segments after all TTS generation completes
- Fix position tracking for pipe-separated tags (e.g., <style:whisper:2|Laughter:5>)
- Adjust tag positions after leading whitespace stripping to maintain accuracy
- Fix space-after logic to only check tags from current match, not all previous tags
- Use clean text for TTS generation (strip edit tags before sending to model)
- Improve display to show clean transcript instead of raw tag syntax
- Add position offset tracking when inserting multiple paralinguistic tags

Resolves issues with:
- <restore> tag being sent to TTS model
- Paralinguistic tags inserted at wrong positions (e.g., h<Laughter> ahaha)
- Edit tags not being extracted properly in pause-segmented text
- Batch processing architecture for edit post-processing
2025-12-08 19:30:53 -03:00
diodiogod 31d243abb4 Add <restore> inline tag for voice restoration after edits
Implements voice restoration feature using ChatterBox Official 23-Lang VC
to restore original voice resemblance after Step Audio EditX edits
(especially after multiple iterations of paralinguistic/emotion/style effects).

Changes:
- Add 'restore' tag parsing to step_audio_editx_special_tags.py
  * Support <restore> and <restore:N> syntax for multi-pass VC
  * Add restore to EDIT_TYPE_VALUES and sorting priority (runs last)
- Add voice restoration to edit_post_processor.py
  * New _restore_voice_via_vc() function reusing UnifiedVoiceChangerNode
  * Store PRE-EDIT audio as voice reference (no engine changes needed)
  * Process restore tags after all other edits complete
  * Fix importlib path for VC node loading

Benefits:
- Works across all 14 engines (7 text + 7 SRT) automatically
- No engine processor changes required
- Reuses existing VC cache system
- Uses pre-edit audio as target (clean, simple)
- Supports multi-pass refinement (1-5 iterations)
- Fully backward compatible

Processing order: emotion → style → speed → paralinguistic → restore
2025-12-08 16:28:24 -03:00
diodiogod 2f8f8c7207 Fix pause processor after making pause type non-capturing
Adjust group numbers: group 1 is now duration, group 2 is unit
Non-capturing group (?:pause|...) doesn't create a numbered group
2025-12-07 08:39:38 -03:00
diodiogod b1c553f1dc Fix pause tag case-sensitivity across all parsers
Make all pause/wait/stop tag patterns case-insensitive:
- segment_parameters.py
- pause_processor.py
- character_parser validation.py
- chatterbox processors
- backup files

Now supports [pause:1], [Pause:1], [PAUSE:1] variants everywhere
2025-12-07 08:34:45 -03:00
diodiogod 12aa64f802 Fix character parser to exclude pause tags case-insensitively
Support [Pause:1], [PAUSE:1], [pause:1] variants
Prevents pause tags from being treated as character names
2025-12-07 08:33:18 -03:00
diodiogod b9d6f19476 Fix ChatterBox v2 native tags being treated as character names
- Character parser now skips ChatterBox v2 special tokens ([laughter], [giggle], etc)
- These tokens are TTS control tags, not character names
- Warns if user has a character with same name as v2 token
- Fix warning system to trigger for all conflicting tags (not just when both formats present)
- Remove debug print from model manager ensure_device
2025-12-07 08:02:08 -03:00
diodiogod 3627980bc5 Fix VRAM management with proper model clearing and synchronization
Resolved OOM errors during model switching by implementing proper VRAM clearing:
- Added real VRAM measurement using torch.cuda.memory_allocated() in model_manager
- Removed fake VRAM reporting from VibeVoice handler
- Removed class-level caching from VibeVoice engine (unified manager handles all caching)
- Centralized device movement through ensure_device() in model manager
- Models now move to CPU instead of deletion for fast reload from cache
- Added CUDA synchronization after clearing to ensure memory is actually freed
- Fixed recursion by adding _from_ensure_device flag to model_load()
- model_load() now calls ensure_device() first to clear other models before loading

Also fixed inline edit tag spacing issues:
- Tags now properly add space after paralinguistic tags when followed by alphanumeric text
- Fixed both parser and post-processor to handle spacing correctly
2025-12-06 16:18:32 -03:00
diodiogod 1fb2a242bc Fix Step Audio EditX inline tags and unified interface integration
ModelLoadConfig parameter fixes:
- Use additional_params dict for torch_dtype and quantization (not direct kwargs)
- Fixed in both adapter and Audio Editor node
- Added model_path resolution to default ComfyUI models directory

Factory fixes:
- Return StepAudioEditXEngine wrapper instead of StepAudioTTS
- Wrapper provides get_sample_rate() and other methods needed by nodes
- Maintains compatibility with adapter and Audio Editor node

Adapter fixes:
- Handle both tuple and tensor returns from engine.clone()
- Inner engine returns (audio, sample_rate), wrapper returns just audio

Paralinguistic tag spacing:
- Auto-insert space before paralinguistic tags when glued to words
- 'whispering<Laughter>' becomes 'whispering [Laughter]'
- Required for Step Audio EditX paralinguistic insertion to work correctly
2025-12-05 22:19:21 -03:00
diodiogod 1f629737d2 Implement inline edit tags for Step Audio EditX post-processing
Added support for inline edit tags in TTS text that automatically apply
Step Audio EditX edits to generated audio from ANY engine.

Syntax examples:
- <Laughter:2> - paralinguistic with iterations
- <emotion:happy:1> - emotion edit
- <style:whisper:3> - style edit
- <speed:faster> - speed adjustment
- <Laughter:2|style:whisper> - multiple effects

Key changes:
- Extended step_audio_editx_special_tags.py with EditTag dataclass and iteration parsing
- Created edit_post_processor.py for centralized post-TTS edit application
- Integrated into Step Audio EditX processor with proper pause tag handling
- Pause tags split FIRST, then edit tags extracted per pause-segment
- Reuses already-loaded engine to avoid duplicate loading

Flow:
1. Parse text, split by pause tags first
2. Extract edit tags from each pause-delimited segment
3. Generate TTS with clean text (tags stripped)
4. Post-processor applies edits to segments with tags
5. Assemble final audio

Currently working for Step Audio EditX TTS and SRT nodes.
2025-12-05 21:20:21 -03:00
diodiogod a55b3bca20 Add Step Audio EditX Audio Editor node for emotion/style/speed/paralinguistic editing
- New dedicated Audio Editor node with 6 edit types: emotion (14), style (32), speed (4), paralinguistic (10), denoise, vad
- Smart paralinguistic text handling: user writes <Laughter> tags, auto-converts to [Laughter] for engine
- Derives clean transcript automatically by stripping tags from input text
- Iteration caching: try 3 passes, then 2, then 1 without re-running (like Voice Changer)
- Token generation progress bar during each edit iteration
- Normalizes newlines/whitespace in text to prevent model parsing issues
- Graceful error when wrong engine type connected (guides user to use Step Audio EditX Engine)
- New special tags registry at utils/text/step_audio_editx_special_tags.py
2025-12-04 20:45:37 -03:00
diodiogod f9c88d7e89 Add Step Audio EditX segment parameter support and fix tooltips
- Add step_audio_editx to PARAMETER_ENGINES for seed and temperature
- Fix engine node tooltips: parameters ARE used in clone mode (not hardcoded)
- Add reference implementation paths to implementation plan
- Update fails doc with latest lessons learned
2025-12-04 13:59:49 -03:00
diodiogod 5c5a1393ca Version 4.14.28
Fix Italian ChatterBox case-sensitive language prefix detection

- Make [it] prefix detection case-insensitive to prevent double-prefixing
- Users can now use [it], [IT], [It] or any capitalization without issues
- Avoids duplication that caused 'IT' to be spoken in output
2025-11-19 23:18:19 -03:00
diodiogod d8cc3333ed Fix parameter-only tag narrator aliasing in character parser
FIXES: Parameter-only tags like [seed:4|exag:1.0] were incorrectly using aliased narrator voice (David) instead of main narrator voice (Tony)

CAUSE: When parsing parameter-only tags, the character parser:
1. Defaulted character to 'narrator'
2. Detected segment_parameters exist
3. But only skipped alias resolution for language-only tags like [de:] or [it:]
4. Result: 'narrator' was normalized through alias system to 'david_attenborough cc3'

SOLUTION: Also skip alias resolution for parameter-only tags by detecting:
- raw_character == default_character (narrator)
- segment_parameters exist (has parameters)
- explicit_language is None (no language specification)

This ensures parameter-only tags use the main narrator voice (Tony from opt_narrator) not the aliased narrator (David)
2025-10-29 10:26:24 -03:00
diodiogod 4936eefdd0 Fix ChatterBox Official 23-Lang SRT cache invalidation between v1 and v2 models
FIXES: When switching from v2 to v1 model, audio cache was not being properly invalidated, causing v2-generated audio to be returned for v1 requests

KEY CHANGES:
1. Extract model_version from config in SRT processor (defaults to v2)
2. Pass model_version to all generate_speech() calls in parameter_switching and simple subtitle paths
3. This ensures cache keys differ between v1 and v2 models, preventing cache misses

ALSO INCLUDES:
- Refactored lang-23 SRT processor to use two-pass architecture matching regular ChatterBox
- First pass: Analyze and categorize all subtitles
- Second pass: Route to appropriate handler (MultilingualEngine for complex, direct for simple)
- Fixed character voice selection to use proper alias mapping via voice_refs
- Use original_character in regular ChatterBox to preserve character identity

This ensures parameter-only tags like [seed:4] correctly use narrator voice (Tony) instead of aliased narrator (David)
2025-10-29 10:11:49 -03:00
diodiogod bb9a64f564 Fix tokenizer caching and console cleanup
- Consolidate character voice info into block generation messages
- Fix tokenizer path structure to match actual storage location (vibevoice/ instead of VibeVoice/tokenizer/)
- Use consistent path for tokenizer downloads so they're found on subsequent runs
- Comment out non-error device_map debug messages
- Remove duplicate SINGLE SEGMENT text printing
- Fix logged_characters to only log once per character (not per priority check)
2025-10-29 01:27:14 -03:00
diodiogod e4a48045a1 Add per-segment parameter switching system (VibeVoice Custom Character Switching)
- New utils/text/segment_parameters.py with parameter validation, aliases, and engine compatibility
- Extended CharacterSegment to include per-segment parameters
- Extended language resolver to parse pipe-separated parameters: [Alice|seed:42|temp:0.5]
- Support for: seed, temperature, cfg, speed, top_p, top_k, inference_steps, exaggeration, emotion_alpha
- Case-insensitive aliases and order-independent syntax
- Integrated into VibeVoice Custom Character Switching mode (text and SRT)
- Fixed grouping logic to break groups when parameters change
- Added PARAMETER_SWITCHING_GUIDE.md documentation
- Updated PROJECT_INDEX.md

NOTE: Currently implemented for VibeVoice Custom Character Switching only.
Native Multi-Speaker mode and other engines will be added in future updates.
2025-10-29 00:36:44 -03:00
diodiogod f3168e940e Add ChatterBox Official 23-Lang v2 support with special emotion tokens
Implemented full support for ChatterBox v2 with enhanced tokenization featuring
30+ special tokens for emotions, sounds, and vocal effects.

Key Features:
- Model version selection (v1/v2) in engine configuration node
- Auto-download of v2 model files (t3_mtl23ls_v2.safetensors, grapheme mappings)
- Special tags system using <emotion> syntax to avoid character switching conflicts
- Automatic conversion of <giggle>, <sigh>, <whisper> etc. to v2 format
- Cache invalidation between v1/v2 to prevent conflicts
- Full integration with character switching and pause tags

Technical Changes:
- Added model_version parameter throughout TTS and SRT processing chain
- Created chatterbox_v2_special_tags.py for tag conversion
- Updated cache keys to include model_version
- Version-aware model loading and validation
- Tag conversion happens after character/pause parsing, before engine

User can now write:
[Alice] Hello! <giggle> Nice to meet you. [pause:0.5] <whisper> Secret!

Documentation added in docs/CHATTERBOX_V2_SPECIAL_TOKENS.md
2025-10-07 23:43:13 -03:00
diodiogod 05c3fcf297 Add [1] [2] [3] [4] support for wildminder VibeVoice format compatibility
For compatibility with wildminder's VibeVoice implementation, added support
for numeric character tags [1] [2] [3] [4] in native multi-speaker mode.

- Numeric characters [1]-[4] now map directly to Speaker 1-4 voice inputs
- Works alongside existing character tag to speaker mapping system
- Mixed usage supported: [1] [2] [Alice] maps to Speakers 1, 2, 3
- Character parser unchanged - handles all existing tags normally
- VibeVoice-specific enhancement in native multi-speaker mode only

This provides users a convenient shorthand format while maintaining
full backward compatibility with existing character tag systems.
2025-09-25 17:54:36 -03:00