#!/bin/bash
set -e

# Initialize virtual environment
if [ ! -d "$PWD/python-env/.venv" ]; then
    python3 -m venv "$PWD/python-env/.venv"
fi
source "$PWD/python-env/.venv/bin/activate"

# Install dependencies
pip3 install --upgrade pip
pip3 install openai-whisper || { echo "Failed to install openai-whisper" >&2; exit 1; }