# ChatterboxTTS Dependencies for ComfyUI

# --- IMPORTANT: TROUBLESHOOTING INSTALLATION ---
# Some dependencies, particularly 's3tokenizer', can occasionally cause installation
# issues on certain Python setups (e.g., Python 3.10, sometimes used by tools like Stability Matrix).
# These issues often manifest as errors related to 'distutils', 'setuptools', or 'egg_info'
# during the build process of a package.
#
# To minimize potential problems, it's HIGHLY RECOMMENDED to first ensure your
# core packaging tools are up-to-date in your activated ComfyUI virtual environment:
#      python -m pip install --upgrade pip setuptools wheel
#
# After running the command above, proceed to install these requirements:
#   pip install -r requirements.txt
#
# If you still encounter issues after these steps:
#   - Restart ComfyUI and let the ComfyUI Manager retry the installation.
#   - As a last resort, consider recreating your virtual environment, then running the
#     `pip install --upgrade pip setuptools wheel` command again before installing any custom node requirements.


# MINIMAL REQUIREMENTS - Only safe, conflict-free packages
# Complex/problematic packages handled by install.py

# Foundation (usually safe)
torch>=2.0.0
torchaudio>=2.0.0

# Basic audio processing (minimal conflicts) 
soundfile>=0.12.0
sounddevice>=0.4.0

# Text processing (safe)
jieba
pypinyin
unidecode
omegaconf>=2.3.0
transformers>=4.46.3
conformer>=0.3.2  # Required for ChatterBox bundled engine
x-transformers    # Required for F5-TTS bundled engine
torchdiffeq       # Required for F5-TTS differential equations
wandb             # Required for F5-TTS training/logging
accelerate        # Required for F5-TTS distributed training
ema-pytorch       # Required for F5-TTS exponential moving average
datasets          # Required for F5-TTS dataset loading

# Basic utilities (safe)
requests
dacite
vocos  # Vocoder for F5-TTS

# F5-TTS - BUNDLED VERSION INCLUDED
# F5-TTS is bundled directly in engines/f5_tts/ to avoid numpy dependency conflicts
# Original F5-TTS 1.1.7 requires numpy<=1.26.4 which conflicts with numpy>=2.0.0
# Bundled version works with numpy 2.x without conflicts
# Note: No need to pip install f5-tts separately
