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.tfliteTFLite Model +filters_vocab_gen.binMel Filters and Vocablibswscale.so libswresample.so libavutil.so libavformat.so libavfilter.so libavdevice.so libavcodec.soFFMPEG for android
- Step 1: VSCode:
- Open the vscode project at
/WhisperVoiceKeyboard/app/src/main/rustand verify the environment variables set in.vscode/settings.json/rust-analyzer.server.extraEnvand.vscode/cargoNdkEnv.sh - run
./.vscode/buildAll.shto 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.