Ramesh Inampudi

Android

Building a Private Android Voice Assistant in My Own Voice

By Ramesh Inampudi · 2026-10-25 · 4 min read

Most voice assistants send your audio to a server, and almost none of them sound like you. I wanted an assistant on my phone that listens, thinks and replies without any audio or text leaving the device, and that speaks in my own cloned voice. Nexus is my attempt at that, built for the Samsung Galaxy Z Fold7. It is written mostly in Kotlin, with C++ for the llama.cpp bridge.

Why I built it

Two products inspired it: Block's Dessa, for natural spoken conversation, and Wispr Flow, for dictating into any app. I wanted both in one app, running offline, with no account. I also wanted the voice to be mine, so that text read aloud on my phone sounds like me rather than a stock voice.

What it does

Nexus has five parts:

The AI model is your choice. In Setup you can pick any GGUF model from Hugging Face and Nexus downloads it into its own private storage. The default is IRx-mini. Claude can be used instead with your own API key, which is kept only in the app's private storage.

How it works

The pipeline is a chain of small models, all running on the CPU:

  1. The microphone feeds Silero VAD v5, which detects when you are speaking.
  2. NVIDIA Parakeet TDT 0.6B v2 (int8, through sherpa-onnx) turns speech into text.
  3. A GGUF model running in llama.cpp, called through JNI, generates the reply. I use each model's own chat template with thinking turned off. The reply streams out as text and is split into sentences.
  4. Sentences go to a text-to-speech model and then to the speaker.

The code is split along those lines. Conversation.kt runs the listen, think, speak loop with barge-in and an echo guard. Engines.kt loads the models and runs a two-stage sentence pipeline. LocalLlm.kt wraps llama.cpp, and Brain.kt handles conversation memory, dictation cleanup and routing between the local model and Claude.

Why two voices

This was the most useful design decision. Chatterbox Turbo (q4 ONNX, on ONNX Runtime) gives the best likeness, but on the Fold7's CPU it runs at roughly real-time speed. That is fine for reading aloud: about 5 seconds before the first sentence, with short pauses between sentences when the phone is warm. It is too slow for back-and-forth conversation.

So live conversation uses Kyutai's Pocket TTS (int8, via sherpa-onnx), which streams audio and starts in about 1.3 seconds, at the cost of a weaker likeness. Reading uses Chatterbox. Rather than hide the trade-off, I exposed it as a choice.

Making Chatterbox usable on a phone

Two things keep it practical. First, the voice is conditioned once on a computer with tools/make_voice.py, so the phone only runs the text-to-speech parts. Second, the voice prefix's KV cache is computed once per launch rather than for every sentence. While reading, sentence N+1 is generated while sentence N is being decoded, which hides some of the latency. Decoding is greedy with a repetition penalty, and I wrote a byte-level BPE tokenizer in Kotlin (Gpt2Tokenizer.kt) that matches Chatterbox's tokenizer.json.

What I learned

Setup in brief

You need macOS or Linux with the Android SDK, JDK 17, ffmpeg and uv, plus an arm64 Android 12+ phone with about 3 GB free. You clone the repository, add 10 to 30 seconds of clean speech as reference.wav, pair the phone over wireless debugging and run scripts/setup.sh. It downloads about 2 GB of models, builds, installs and copies the models to the phone. After that, you enable Nexus as the text-to-speech engine, the dictation keyboard and optionally the assistant in Setup.

Conclusion

Nexus is a combination of existing open models, wired together so that listening, thinking and speaking all stay on the phone. The main lesson is to pick the right model for each job and be honest about the trade-offs, which in this case meant two voices rather than one compromise.