Paused Other work

EdgeMind

An Android voice assistant that runs entirely on the device. Gemma 4 E2B with native audio input does the reasoning; tools dispatch through reflection. Your voice never leaves the phone.

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 .litertlm file 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-genai could 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 hand-written SentencePiece tokenizer, and a KV cache that took generation from about 800 ms/token to 200 ms.

Status

Paused. The hard parts work end to end: the model loads, audio goes in, tools dispatch and replies come out. What is 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.

Written with AI assistance. I plan to rewrite it by hand.