summaryrefslogtreecommitdiff
path: root/tools/whistle-eval/setup.sh
diff options
context:
space:
mode:
authorTom Cooks <tommasogagliardi+github@gmail.com>2026-10-10 15:42:04 -0400
committerTom Cooks <tommasogagliardi+github@gmail.com>2026-10-10 15:42:04 -0400
commit901bf58c5cf9151942f8c4cd4e1427a02dec4b52 (patch)
treee9e312fb9893881f142a6f79e30417cd0c3f2be8 /tools/whistle-eval/setup.sh
parent6db1714d0354d1e1105e330ce84c46a54487c3bb (diff)
downloadreccoon-901bf58c5cf9151942f8c4cd4e1427a02dec4b52.tar.gz
RECCoon 1.0.0: rebrand to Tom Cooks, Parakeet-only, GPLv3, F-Droid-ready
Diffstat (limited to 'tools/whistle-eval/setup.sh')
-rwxr-xr-xtools/whistle-eval/setup.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/whistle-eval/setup.sh b/tools/whistle-eval/setup.sh
new file mode 100755
index 0000000..fde74fe
--- /dev/null
+++ b/tools/whistle-eval/setup.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# Fetches everything the Whistle evaluation harness needs and rebuilds the
+# ONNX external-data files from the small whistle.pack.
+set -euo pipefail
+cd "$(dirname "$0")"
+
+WHISTLE_BASE="https://huggingface.co/mrfakename/whistle-ONNX/resolve/main"
+WHISPER_BASE="https://huggingface.co/csukuangfj/sherpa-onnx-whisper"
+
+mkdir -p vendor/js vendor/onnx models/tiny models/base
+
+echo "==> Downloading the Whistle pack and ONNX graphs"
+curl -L --fail -o vendor/whistle.pack "$WHISTLE_BASE/whistle.pack"
+curl -L --fail -o vendor/onnx/encoder.onnx "$WHISTLE_BASE/onnx/encoder.onnx"
+curl -L --fail -o vendor/onnx/decoder.onnx "$WHISTLE_BASE/onnx/decoder.onnx"
+
+echo "==> Downloading the reference JS pipeline"
+for file in pack.js whistle.js backend.js example.mjs; do
+ curl -L --fail -o "vendor/js/$file" "$WHISTLE_BASE/js/$file"
+done
+
+echo "==> Installing onnxruntime-node"
+npm install --no-audit --no-fund
+
+echo "==> Rebuilding fp32 ONNX data from whistle.pack"
+node build-data.mjs
+
+echo "==> Downloading Whisper tiny/base int8 (sherpa-onnx)"
+for model in tiny base; do
+ for file in encoder.int8.onnx decoder.int8.onnx tokens.txt; do
+ curl -L --fail -o "models/$model/$file" "$WHISPER_BASE-$model/resolve/main/$model-$file"
+ done
+done
+
+echo
+echo "Done. Next:"
+echo " python3 -m venv .venv && .venv/bin/pip install sherpa-onnx numpy"
+echo " .venv/bin/python evaluate.py \"samples/*.wav\""