#!/usr/bin/env bash # # fetch-whisper.sh — vendor the whisper.cpp sources needed for the NDK build. # Pinned to a release tag so the JNI layer never breaks on master churn. set -euo pipefail TAG="v1.9.3" REPO="https://github.com/ggml-org/whisper.cpp" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/third_party" mkdir -p "$DIR" if [ -f "$DIR/whisper.cpp/src/whisper.cpp" ]; then echo "whisper.cpp already present at $DIR/whisper.cpp" else echo "cloning whisper.cpp $TAG into $DIR/whisper.cpp ..." git clone --depth 1 --branch "$TAG" "$REPO" "$DIR/whisper.cpp" fi