EdgeMind
An Android voice assistant running Gemma 4 with native audio and tool calling, entirely on the phone. No cloud, no account, no telemetry.
- Role
- Solo developer · research and engineering
- Stack
- ~2.5 GB
- Gemma 4 model running on the phone
- 8
- tools called by voice: timer, calendar, contacts and more
- 800 → 200 ms
- per token after a hand-written KV cache (Phi-3 branch)
EdgeMind is an Android voice assistant that runs entirely on the device: no cloud, no account, no telemetry. Hold a button, talk, and a local model either answers or calls a tool. Your voice never leaves the phone.
What it does
- Gemma 4 E2B with native audio. The mic bytes go straight into the model, with no separate speech-to-text stage.
- Tool calling through reflection. Timer, calendar (read and write), contacts, music transport, flashlight, volume, app launch and web search, all on-device against Android APIs.
- Downloaded model. The ~2.5-3 GB
.litertlmfile is fetched once from HuggingFace, not bundled in the APK. - Voice out through Android’s built-in
TextToSpeech; push-to-talk in.
What was hard
- MediaPipe
tasks-genaicould not load Gemma 4’s audio adapter: the model pins it to CPU, while that runtime hardcodes the audio executor to GPU. Dropping to LiteRT-LM, which exposes per-modality backends, is the only path that works. - LiteRT-LM decodes audio with miniaudio, which reads the format from a header. Prepending a 44-byte RIFF/WAVE header to the raw PCM is what turns “miniaudio error -10” into working audio input.
- An earlier Phi-3 branch is where most of the learning happened: a KV cache that took generation from about 800 ms/token to 200 ms.
Status
Paused. The hard parts work: the model loads, audio goes in, tools dispatch, replies come out. What’s left is polish - mainly registering as the device’s default assistant and a hands-free mode behind on-device VAD.
Source: github.com/IgnacioLD/edgemind.
Drafted with AI, edited by hand. I publish it when it sounds like me.