#!/bin/bash

# Check if Python environment is activated
if ! command -v TTS &> /dev/null; then
    echo "Error: Coqui TTS is not installed or not in PATH. Activate the virtual environment."
    exit 1
fi

# Check if Whisper is installed
if ! command -v whisper &> /dev/null; then
    echo "Error: Whisper is not installed. Install it with 'pip install openai-whisper'."
    exit 1
fi

# Check if mod-script-pipe is running (if using Audacity)
if [ ! -e /tmp/audacity_script_pipe.to.503 ]; then
    echo "Error: Audacity mod-script-pipe is not running. Start Audacity and enable it."
    exit 1
fi

echo "✅ All systems GO. Starting processing..."