#!/usr/bin/env bash set -euo pipefail script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" if [[ -f "$script_dir/scripts/jrich-wakeword-trainer" ]]; then trainer_root="$script_dir" else trainer_root="$(cd "$script_dir/.." && pwd)" fi if ! command -v python3 >/dev/null 2>&1; then echo "Python 3.11 or newer is required. Install it, then run this file again." >&2 exit 1 fi exec python3 "$trainer_root/scripts/jrich-wakeword-trainer" "$@"