TODO! I wrote this before i was made aware of whisper.cpp. Need to integrate that, into this, or build a new one on that.
Integration of the OpenAI speech to text model into Android.
- Rust
- Rust Android Targets
rustup target add aarch64-linux-android
# for arm64rustup target add x86_64-linux-android
# for x86_64
- Cargo NDK
- Rust Android Targets
- Android Studio
- Tools -> SDK Manager -> SDK Tools ->
- Android SDK Build-Tools 33.0.0
- NDK 25.1.8937393
- Tools -> SDK Manager -> SDK Tools ->
- VSCode
- Extensions
whisper.tflite
TFLite Model +filters_vocab_gen.bin
Mel Filters and Vocablibswscale.so libswresample.so libavutil.so libavformat.so libavfilter.so libavdevice.so libavcodec.so
FFMPEG for android
- Step 1: VSCode:
- Open the vscode project at
/WhisperVoiceKeyboard/app/src/main/rust
and verify the environment variables set in.vscode/settings.json/rust-analyzer.server.extraEnv
and.vscode/cargoNdkEnv.sh
- run
./.vscode/buildAll.sh
to build the rust artifacts.
- Open the vscode project at
- Step 2: Android Studio: Just open the project. Need to expand project view to see rust files. Primarily for editing the Android App source.