Run the Android Voice Assistant app on a device or emulator with minimal ML experience. The app records speech, transcribes it, generates a response using an LLM, and plays it back using Android Text-to-Speech.
flowchart LR
mic[(Microphone)] --> stt[Speech to Text]
stt -- Prompt --> llm[LLM]
llm -- LLM Decode / Response --> tts[Android Text to Speech]
tts --> speaker[(Speaker)]
To get the Android Voice Assistant app running quickly:
- Open the repo in Android Studio.
- Let Gradle sync and download dependencies.
- Select an arm64 or x86_64 device/emulator.
- Click Run.
Note
-
If you're using a physical device, make sure USB debugging is enabled in Developer Options.
-
The first build may take several minutes as dependencies and models are downloaded.
For command-line builds and model configuration details, continue below.
| Item | Why you need it |
|---|---|
| Android Studio | Build and run the app |
| Android NDK r29 | Native C++ modules |
| CMake 3.27+ | Native builds |
| Python 3 | Push resources/models |
| Device or emulator (arm64 or x86_64) | Run the app |
Create local.properties in the repo root if you do not already have one:
cmake.dir=/path/to/cmake./gradlew assembleDebugTo select a different LLM backend at build time:
./gradlew assembleDebug -PllmFramework=onnxruntime-genaiModel files are downloaded during the build and deployed to the device using the app's resource push script. If you need to manually push resources later, use:
STT:
python3 app/pushAppResources.py <local_dir> <device_dir>LLM:
python3 app/pushAppResources.py <local_dir> <device_dir> --llm_framework <LLM_FRAMEWORK>>For more information please see the documentation in the LLM Configuration and our pushAppResources script script.
| Path | Description |
|---|---|
app/ |
Android application and UI code |
stt/ |
Speech-to-text module including models and configuration files |
llm/ |
LLM module including models and configuration files |
resources/ |
Resources used by the application |
- Read docs/benchmarking.md to measure latency and throughput.
- Review README.md for configuration options (KleidiAI, LLM backends, custom model configs).