Ariver
2026-07-06 ac1d4fd8ef875312d11acd4e4e5935ced542c227
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
set -euo pipefail
 
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
WAV_PATH="${1:-"$ROOT_DIR/testdata/perf/baseline.wav"}"
RUNS="${2:-3}"
 
if [[ ! -f "$WAV_PATH" ]]; then
  cat >&2 <<EOF
Missing WAV fixture: $WAV_PATH
 
Usage:
  scripts/benchmark-recognition.sh /absolute/path/to/baseline.wav 5
 
The WAV must be 16kHz mono PCM16. Keep the same fixture across versions for A/B performance comparison.
EOF
  exit 2
fi
 
cd "$ROOT_DIR"
go run ./cmd/benchmark-recognition --wav "$WAV_PATH" --runs "$RUNS"