# Chatterbox TTS API Configuration # Copy this file to .env and modify the values as needed # ============================================================================= # Server Configuration # ============================================================================= # Port to run the API server on PORT=4123 # Port for frontend/proxy when using fullstack mode (when API runs behind proxy) # Only used when running with --profile frontend FRONTEND_PORT=4321 # Host to bind the server to (0.0.0.0 for all interfaces) HOST=0.0.0.0 # CORS origins (comma-separated list) CORS_ORIGINS=* # ============================================================================= # Voice and Model Configuration # ============================================================================= # Device to use for inference (auto/cuda/mps/cpu) # auto = automatically detect best available device DEVICE=auto # Path to the voice sample file for cloning VOICE_SAMPLE_PATH=./voice-sample.mp3 # Alternative: Use a voice sample from a mounted directory # VOICE_SAMPLE_PATH=/app/voice-samples/my-voice.mp3 # Directory to cache downloaded models (for persistence) # Use ./models for local development, /cache for Docker MODEL_CACHE_DIR=./models # Directory to store uploaded voice library (for persistence) # Use ./voices for local development, /voices for Docker VOICE_LIBRARY_DIR=./voices # ============================================================================= # TTS Model Settings # ============================================================================= # Enable multilingual TTS model (true/false) # true = Support 23 languages with multilingual model (default) # false = English-only with standard model USE_MULTILINGUAL_MODEL=true # Emotion intensity/exaggeration level (0.25 - 2.0) # 0.5 = neutral, higher values = more expressive EXAGGERATION=0.5 # CFG weight for pace control (0.0 - 1.0) # Lower values = faster speech, higher values = slower/more deliberate CFG_WEIGHT=0.5 # Sampling temperature (0.05 - 5.0) # Lower values = more deterministic, higher values = more random/creative TEMPERATURE=0.8 # ============================================================================= # Text Processing # ============================================================================= # Maximum characters per text chunk (recommended: 200-300) MAX_CHUNK_LENGTH=280 # Maximum total characters for entire input (hard limit) MAX_TOTAL_LENGTH=3000 # ============================================================================= # Docker-specific Configuration # ============================================================================= # Host path to voice sample file (for Docker volume mounting) VOICE_SAMPLE_HOST_PATH=./voice-sample.mp3 # Host directory containing voice samples (optional) # VOICE_SAMPLES_DIR=./voice-samples # ============================================================================= # Advanced Settings (usually don't need to change) # ============================================================================= # Memory Management # Cleanup memory every N requests (default: 5) MEMORY_CLEANUP_INTERVAL=5 # Clear CUDA cache every N requests (default: 3) CUDA_CACHE_CLEAR_INTERVAL=3 # Enable detailed memory monitoring and logging (true/false) ENABLE_MEMORY_MONITORING=true # HuggingFace cache directory (optional) # HF_HOME=/cache/huggingface # Disable HuggingFace telemetry (true/false) # HF_HUB_DISABLE_TELEMETRY=true # PyTorch cache directory (optional) # TORCH_HOME=/cache/torch # ============================================================================= # Examples for different use cases: # ============================================================================= # For more expressive/dramatic speech: # EXAGGERATION=0.8 # CFG_WEIGHT=0.3 # TEMPERATURE=1.0 # For neutral/professional speech: # EXAGGERATION=0.4 # CFG_WEIGHT=0.6 # TEMPERATURE=0.6 # For faster processing (less stable): # MAX_CHUNK_LENGTH=400 # TEMPERATURE=0.5 # For slower, more careful speech: # CFG_WEIGHT=0.8 # TEMPERATURE=0.4