# TTS Audio Suite - Universal TTS for ComfyUI
# Comprehensive multi-engine TTS with Python 3.13 compatibility

# --- INSTALLATION METHOD ---
# This custom node uses install.py for intelligent dependency management.
# ComfyUI Manager automatically runs install.py which handles:
# - Python 3.13 compatibility issues (MediaPipe → OpenSeeFace fallback)
# - NumPy version conflicts (constraints to avoid Numba issues)
# - Package dependency conflicts (selective --no-deps installation)
# - All bundled engines: ChatterBox, F5-TTS, Higgs Audio
# - Optional features: RVC voice conversion, mouth movement analysis

# --- CORE SAFE PACKAGES ---
# These packages rarely cause conflicts and install normally

# Foundation ML packages
torch>=2.0.0
torchaudio>=2.0.0
numpy>=2.2.0,<2.3.0  # Critical: avoid 2.3.x for Numba compatibility

# Audio processing (safe)
soundfile>=0.12.0
sounddevice>=0.4.0

# Text processing (safe)
jieba
pypinyin
unidecode
omegaconf>=2.3.0
transformers>=4.46.3  # Required for Higgs Audio compatibility

# ML utilities (safe)
accelerate
datasets
requests
dacite

# Bundled engine dependencies (safe)
conformer>=0.3.2      # ChatterBox engine
x-transformers        # F5-TTS engine  
torchdiffeq          # F5-TTS differential equations
wandb                # F5-TTS logging
ema-pytorch          # F5-TTS exponential moving average
vocos                # F5-TTS vocoder

# RVC voice conversion (safe)
monotonic-alignment-search
faiss-cpu>=1.7.4

# Computer vision (safe)
opencv-python
pillow

# --- PROBLEMATIC PACKAGES ---
# These are installed by install.py with special handling:
# - librosa (--no-deps): Forces numpy downgrade
# - descript-audio-codec (--no-deps): Conflicts with protobuf
# - cached-path (--no-deps): Forces package downgrades  
# - torchcrepe (--no-deps): Conflicts via librosa dependency
# - onnxruntime (--no-deps): Forces numpy 2.3.x, needed for OpenSeeFace

# --- PYTHON 3.13 NOTES ---
# ✅ All TTS engines work (ChatterBox, F5-TTS, Higgs Audio)
# ✅ RVC voice conversion works
# ✅ OpenSeeFace mouth movement (experimental alternative)
# ❌ MediaPipe incompatible (binary compatibility issue)

# --- BUNDLED ENGINES ---
# All engines are bundled to avoid external dependency conflicts:
# - ChatterBox: engines/chatterbox/ (modified for ComfyUI)
# - F5-TTS: engines/f5_tts/ (numpy 2.x compatible fork)
# - Higgs Audio: engines/higgs_audio/ (transformers 4.46+ compatible)
