ai-experiment/usage.sh
2026-09-18 17:02:51 +07:00

19 lines
494 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON="${PYTHON:-$BASE_DIR/.venv/bin/python}"
if [ ! -x "$PYTHON" ]; then
echo "Venv not found. Create it with: python3 -m venv .venv && .venv/bin/pip install -r requirements.txt" >&2
exit 1
fi
if [ $# -lt 1 ]; then
echo "Usage: $0 <audio_file...>" >&2
echo " Transcribe audio with Qwen3-ASR 1.7B (sherpa-onnx)." >&2
exit 1
fi
"$PYTHON" "$BASE_DIR/stt_runner.py" "$@"