Add native Android app scaffold (M0): whisper.cpp engine via JNI

- android/: Gradle/Kotlin project (AGP 9.4, Compose, NDK 27.1), monorepo
  subdir as planned; whisper.cpp v1.9.3 vendored via pinned fetch script
- core/whisper: JNI wrapper (beam size, threads, language) + WhisperEngine
  Kotlin API mirroring the desktop engine contract
- app (M0 scope): in-app GGML model download from Hugging Face, engine
  load, WAV picker with resampling, on-device transcription, share sheet
- build validated: assembleDebug OK, libwhisper_jni.so + ggml packaged
This commit is contained in:
2026-09-07 11:00:31 +02:00
parent 66408e291d
commit 404f3db200
22 changed files with 1273 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/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