from pathlib import Path

# Determine PROJECT_ROOT dynamically.
# If config.py is at /Volumes/SAM2/CODE/chatterbox-test/backend/app/config.py
# then PROJECT_ROOT (/Volumes/SAM2/CODE/chatterbox-test) is 2 levels up.
PROJECT_ROOT = Path(__file__).resolve().parents[2]

# Speaker data paths
SPEAKER_DATA_BASE_DIR = PROJECT_ROOT / "speaker_data"
SPEAKER_SAMPLES_DIR = SPEAKER_DATA_BASE_DIR / "speaker_samples"
SPEAKERS_YAML_FILE = SPEAKER_DATA_BASE_DIR / "speakers.yaml"

# TTS temporary output path (used by DialogProcessorService)
TTS_TEMP_OUTPUT_DIR = PROJECT_ROOT / "tts_temp_outputs"

# Final dialog output path (used by Dialog router and served by main app)
# These are stored within the 'backend' directory to be easily servable.
DIALOG_OUTPUT_PARENT_DIR = PROJECT_ROOT / "backend"
DIALOG_GENERATED_DIR = DIALOG_OUTPUT_PARENT_DIR / "tts_generated_dialogs"
