A private, on-device voice assistant and home screen for an Android kitchen tablet. It switches the lights and the TV, keeps timers, alarms, reminders and lists, answers kitchen questions, and reads the weather and the news. The wake word, speech recognition, three fine-tuned models and the spoken voice all run on the tablet. Nothing leaves the tablet unless a request needs the internet, and general questions go out only if you allow it.
Watch the demo video (103 seconds, with sound): the lights, a timer, a Wikipedia lookup, a food-safety question, What to watch (browsing, searching and voice search onto the TV), the TV remote and the night clock. It is rendered from the app's own screens by its tests, with a pretend home; it was not filmed on a tablet (how it is made).
A filmed demo of the real tablet will be added here.
The video and its preview include text from the Wikipedia article "Umami" (revision 1386835649), by Wikipedia contributors, under CC BY-SA 4.0; the video is licensed under CC BY-SA 4.0 too. Voices: Piper "cori" and "norman", from public-domain LibriVox recordings (MIT weights).
What it does · Why it is interesting · How a request flows · Models · Hardware · Privacy · Download & install · Limitations · Layout · Testing · Docs · Acknowledgements · Licence
- Home screen. It replaces the tablet's launcher: clock, weather, lights by room, scenes, the TV, timers and lists, an app drawer, and a dim clock screen saver while charging.
- Lights. Casambi networks (Evolution and Classic firmware), straight over Bluetooth LE. Rooms, scenes, brightness, white tone; wall switches can start routines.
- TV. An Android TV box over the Android TV Remote protocol on the home network (keys, apps, power, search on YouTube), and the Samsung TV behind it for volume and mute.
- What to watch. Find a film or series on the tablet — by touch, dictation or voice ("search the TV for The Bear", then pick by number, app name or "play it") — see which of the TV's apps has it in your country (Switzerland or Spain), and open it on the TV by link. Looked up on Watchmode with the household's own free key, kept encrypted on the tablet; off until set up (docs/TV.md).
- Phone companion (
:lights). A lightweight (~21 MB, Apache-2.0) standalone Android phone app for Casambi lights — created because the official Casambi app lacks a home-screen widget and Quick Settings controls. Offers compact Google Home–style room/light tiles, an adaptive 1- or 2-row widget, 8 configurable Quick Settings tiles with custom icons, Android Device Controls, and fast on-demand BLE with auto-disconnect (docs/LIGHTS-APP.md). - Time and lists. Timers, alarms, reminders, shopping and to-do lists, and routines (Goodnight, Good morning, your own), stored on the tablet.
- Kitchen. Unit conversions, cooking times and food-safety advice from small cited tables (USDA FSIS, FoodKeeper).
- Weather and news. Open-Meteo forecasts and an RSS headline feed (BBC News by default).
- General questions, with consent. Looked up on English Wikipedia and worded by the on-device talker, only while "Look things up online" is on. Otherwise the assistant declines and sends nothing. It never answers from a model's own knowledge.
Voice, touch and typing (the Type button) all reach the same tools. English only for now.
Screens rendered by the app's screenshot tests with a pretend home (more in docs/UX.md).
- Seven models share one 8 GB tablet: a wake-word spotter, voice detection, speech recognition, a BERT command model, FunctionGemma 270M for tool calls, a Qwen3-0.6B "talker" under llama.cpp, and a neural Piper voice. Three of them are fine-tuned by this project and published on Hugging Face.
- A cascade, cheapest first. The 11 MB command model answers most commands in about 40 ms. Only what it is unsure of goes to FunctionGemma, and only a looked-up answer or an optional spoken reply goes to the talker.
- Models decide, code only checks. There are no hand-written phrase rules. Every tool call is checked against its schema, and a veto blocks a light or scene the request never named. An invented action is refused, never rewritten.
- Guarded words. The talker only rewords text it is given; its words are compared with that text before they are spoken, and the fallback (the tools' own sentence, or the start of the article) is always true.
- Blind evaluation. Each training round is judged on a frozen set of cases written for a home the models never saw (evaluation/README.md).
flowchart LR
Mic["Microphone"] --> Wake["Wake word<br/>sherpa-onnx"]
Wake --> VAD["Voice detection<br/>Silero VAD"]
VAD --> STT["Speech to text<br/>Android on-device<br/>or Moonshine"]
STT --> BERT["Command model<br/>BERT, 11 MB"]
BERT -- "sure" --> Tools["Tools<br/>lights, TV, timers,<br/>lists, weather, kitchen"]
BERT -- "not sure" --> FG["FunctionGemma 270M<br/>tool calls, checked"]
FG --> Tools
FG -- "general question" --> Wiki(["Wikipedia<br/>only with consent"])
Wiki --> Talker["Talker<br/>Qwen3-0.6B, llama.cpp"]
Tools --> Voice["Piper voice"]
Talker --> Voice
The command model acts only when its confidence is at least 0.88 and the reading fits the home; anything else goes
to FunctionGemma, which answers with tool calls, none, a question back, or chat for a general question. A
typed request starts at the command model. The full decision flow, the voice pipeline step by step, the time limits
and the fallbacks are in docs/ARCHITECTURE.md.
| Model | Job | File, runtime | Measured | Get it |
|---|---|---|---|---|
| Command model: BERT L-4 H-256, fine-tuned | Intent and slots of every sentence | 11.2 MB int8, plain Kotlin | 38 ms median a sentence in the whole stack on the tablet; alone, 516 of 604 built-in cases right with 0 wrong actions (NLU.md) | In the APK; also Feleir/privateassistant-command-bert-l4-h256 |
| FunctionGemma 270M, fine-tuned (v8) | Requests the command model passes on, as tool calls | 301 MB int8 .litertlm, LiteRT-LM 0.19.1 |
On the tablet: 60 / 60 right, 0.5 s median per request (load 0.2 s, +213 MB RSS). On the Mac, whole stack (mean of three runs): 628.3 of 642 built-in cases right, 3.0 wrong actions; blind set 7: 243.0 of 276 right, 11.0 wrong actions; blind sets 2–6: 867.7 of 1,033 right (MODEL-PLAN.md) | Downloaded by the app from Feleir/privateassistant-functiongemma-home; data: Feleir/privateassistant-functiongemma-home-data |
| Talker: Qwen3-0.6B, LoRA fine-tune (talker-v2) | Words looked-up answers and, if switched on, replies | 639 MB Q8_0 GGUF, llama.cpp v1.1.0, 2 threads | On the tablet: replies median 1.09–1.16 s, 90th percentile 1.77–1.91 s, 118 of 125 pass the guard; lookups' first word 1.15–1.17 s; +757 MB memory, loads in 1.3 s (MEMORY.md, sections 6–7) | Downloaded by the app from Feleir/privateassistant-talker-qwen3-0.6b-gguf |
| Speech recognition: Android's on-device recogniser, else Moonshine Tiny | Speech to text | Android's own; Moonshine 105 MB, sherpa-onnx | On the tablet, synthetic voices: 2.2–3.3 % of words wrong at about 290 ms (Android), 5.5–6.0 % (Moonshine Tiny) (SPEECH.md) | Android; Moonshine in the APK |
| Wake word (sherpa-onnx keyword spotter), Silero VAD, Piper "Cori" voice | Hearing "hey computer", finding the end of speech, speaking | sherpa-onnx 1.13.8 | Piper: 0.3–0.85 s a reply on the tablet (MODEL-PLAN.md, "Measure on the tablet") | In the APK |
The whole app, with everything loaded and at rest (FunctionGemma + talker-v2): 2,103 MB total PSS on a tablet with 7.4 GB usable, and about 1.24 GB of model and cache storage beyond the APK (MEMORY.md, sections 6–7). Optional recognisers (Moonshine Base, Whisper, NVIDIA Parakeet TDT 0.6B v2 under CC BY 4.0 with attribution to NVIDIA, a zipformer) and three more voices are separate downloads. Every model file, its licence and its pinned SHA-256 are in docs/ARCHITECTURE.md.
- Tablet: an Amazon Fire tablet, MediaTek MT8189 (2× Cortex-A78 + 6× Cortex-A55), 8 GB RAM (7.4 GB usable), Android 16. The project's models and the speech models run on its CPU.
- TV: an Android TV box (Android 11) over the Android TV Remote protocol v2, with an optional read-only debugging link for "what's playing"; a 2021 Samsung TV (Tizen) for volume and mute (docs/TV.md).
- Lights: one Casambi network over Bluetooth LE.
That is one of each. Other Android 13+ arm64 tablets should work but are untried.
| Stays on the tablet | Goes online, and when |
|---|---|
| Microphone audio, the wake word, speech recognition, and what was said (no audio or transcript is stored) | The words of a general question, to en.wikipedia.org, only while "Look things up online" is on |
| Every model and every model's reading of a request | The town's position (or a place asked about), to Open-Meteo, for the weather |
| Light keys, the TV certificate, the PIN hash and settings, excluded from backups | News headlines from the chosen feed, only when asked for the news |
| Light control (Bluetooth) and TV control (home Wi-Fi) | api.casambi.com, once, when a Casambi network is added, to fetch its keys |
| Your Watchmode key, sealed by the Android Keystore in the no-backup folder | What you search for in What to watch, a title's id and the country, with your own key, to api.watchmode.com, only while "Find what to watch online" is on |
| Model downloads you start (GitHub, Hugging Face), and "Check for updates" when pressed |
The same list is in the app: Settings → Tablet & privacy → Privacy. Logs record what answered and how long it took, never what was said. News, weather and looked-up text are spoken but never handed back to a model, so a hostile headline cannot make it act. The tablet's own software (Alexa on a Fire tablet, for example) sends its own data whatever this app does. Detail: docs/ARCHITECTURE.md.
Quick start (prebuilt APKs): download the latest release-signed APKs and SHA-256 checksums from GitHub Releases (Android 13+ / arm64):
privateassistant-v*.apk— the kitchen tablet launcher & voice assistant (~396 MB, includes bundled speech models).privateassistant-lights-v*.apk— the standalone Casambi Lights phone companion (~22 MB, Apache-2.0).
Build from source: you need JDK 21; the Android SDK (compile SDK 36) in ANDROID_HOME or sdk.dir in
local.properties; and for the talker, NDK 29.0.14206865 (without it a debug build still works, with a warning and no
talker; or pass -Pllamacpp.native=true to let the Android plugin install it). The first build downloads about 2.4 GB
of dependencies and speech models, and the debug APK is about 416 MB (docs/TESTING.md).
The device: Android 13 or later (min SDK 33), arm64 only, with about 2.2 GB of RAM to spare for everything at
once and about 1.2 GB of storage beyond the APK for the two downloaded models and FunctionGemma's cache.
git clone https://github.com/feleir/privateassistant.git && cd privateassistant
export ANDROID_HOME=~/Library/Android/sdk # wherever your SDK is
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk- Several user profiles on the tablet?
adb installinstalls for every profile. To keep the app in the one you use, add--user $(adb shell am get-current-user); docs/TESTING.md does the same on every command. - An update must be signed with the same key as the installed app; replacing one means an uninstall, which wipes the setup. For a tablet you keep, use the release-signed APKs or set up release signing first (docs/RELEASING.md). Tagged releases publish both release-signed APKs with their Corresponding Source on GitHub Releases.
First run. A setup flow walks through Lights (Bluetooth and your Casambi network's password), TV (pick the box, type the code it shows), Voice (the microphone), Look things up online (on or off), Weather and units, and making the app the home screen and the tablet's assistant. Every step can be skipped and done later in Settings.
The two fine-tuned models are not in the APK. Settings → Tablet & privacy → Downloads → Download fetches FunctionGemma (301 MB, with the Gemma Terms of Use notice) and the talker (639 MB) from Hugging Face at the commit the app pins, and checks each against its pinned size and SHA-256. Without internet, put the file on the tablet and use From file, or copy it with adb (docs/TESTING.md). Without FunctionGemma the command model answers alone; without the talker a lookup reads the start of the article.
- One of each was tried: one tablet, one TV box, one Casambi network. The Casambi code is a port of a reverse-engineered library labelled alpha, and Classic firmware is the least tested part.
- Not yet measured on the tablet: a 24-hour memory soak, peak memory right after a heavy burst, and the end-to-end time from the wake word to the first audio.
- Accuracy comes from written test sets and synthetic voices, not real voices in a real kitchen. The wake word's false-wake rate over hours of household noise is unknown.
- General questions answer only what a Wikipedia intro says.
- Direct TV search is YouTube only; other apps go through What to watch: Netflix and other streaming apps have no search link the box opens. With What to watch enabled (using your own free Watchmode key), title searches look up streaming availability on the tablet and open verified title links on the box (Netflix, Prime Video and Disney+ verified on the test box; other services are still being checked).
- English only. Spanish is planned (docs/I18N-PLAN.md).
- No alarm rings between a reboot and the first unlock (the app is not direct-boot aware).
Everything measured, every check still open and every known gap: docs/STATUS.md.
| Module | What it is |
|---|---|
app |
The Android tablet app: launcher UI (Compose), setup, settings, the voice loop, the drivers, the LiteRT-LM engine, model downloads, AppGraph (all wiring) |
lights |
Lightweight standalone Android phone companion APK (~21 MB, Apache-2.0) for Casambi lights: fast on-demand BLE, adaptive home-screen widget, 8 Quick Settings tiles, and Android Device Controls (docs/LIGHTS-APP.md) |
core |
The device model, the home, name matching, every tool, the language packs |
assistant |
Sentence to actions and answer: CommandPlanner, the FunctionGemma loop with its checks and veto, general questions, the talker's guards, the evaluation harness |
nlu |
The command model at run time (WordPiece and a 4-layer BERT in plain Kotlin); training in nlu/train |
llamacpp |
llama.cpp as a JNI library (arm64, CPU) for the talker |
voicepipeline |
The voice loop's plain-Kotlin logic: listening, barge-in, follow-ups |
casambi, androidtv, samsungtv |
The Casambi Bluetooth protocol, Android TV Remote v2, the Samsung TV's remote and UPnP |
llmeval, speechcheck |
Desktop harnesses: score a language model the way the app runs it; run the speech models end to end |
Outside Gradle: finetune/ (FunctionGemma and talker training), nlu/train/, voice-lab/ (wake-word
experiments), evaluation/ (the blind sets), docs/. Everything except app, lights and llamacpp is plain JVM
Kotlin and is tested off the tablet.
./gradlew test runs every module's unit tests, including Robolectric UI and screenshot tests, a fake Samsung TV and
the language tiers with fake models; ./gradlew :assistant:eval scores the command model on a sample home; and
./gradlew :speechcheck:test runs the bundled speech models end to end on Linux x86-64 and Apple-silicon Macs.
On-tablet benchmarks and the hand checks only a tablet can show (reboot, the screen saver, the assistant role) are
in docs/TESTING.md. Never run connectedAndroidTest on a tablet you use: it uninstalls the app
afterwards, which wipes the setup. Training the models: finetune/README.md (FunctionGemma and
the talker), nlu/README.md (the command model).
| Doc | What it covers |
|---|---|
| ARCHITECTURE.md | Features and their code, modules, the voice pipeline, when each model is used, every model file, privacy in the code |
| STATUS.md | What is measured on the tablet, what is not yet checked, known gaps |
| MODEL-PLAN.md, NLU.md, TALKER.md | The language models: the rule, how a model is judged, the rounds; the command model; the talker |
| SPEECH.md, WAKE-WORD.md | Speech recognition, interrupting, the voices; the wake word and teaching it a voice |
| TV.md, LIGHT-PROVIDERS.md, LIGHTS-APP.md | The TV links and their failure modes; adding a light system; the standalone Android phone companion for Casambi lights |
| LOOKUP-SOURCES.md, MEMORY.md | General-question sources compared; where the memory goes |
| TESTING.md, RELEASING.md, LLM-EVAL.md, evaluation/README.md | Installing, measuring and checking on the tablet; releases and signing; the model harness; the blind sets |
| UX.md | The UI's rules and screens |
| ADDING-A-LANGUAGE.md, I18N-PLAN.md | How to add a language; the plan for Spanish |
| LICENSING.md, PUBLISHING-MODELS.md, THIRD_PARTY_NOTICES.md | The licensing audit; publishing the models; what the APK contains |
| CONTRIBUTING.md, SECURITY.md | Project rules, good areas to contribute, and reporting security issues |
This project was built by its author with substantial help from Claude (Anthropic), working through
Claude Code. The author chose what to build, made the decisions, and ran and checked the app on the real
tablet, TV and lights. Claude wrote most of the code and the documentation, the phrase templates and word lists the
training data is generated from, and the training and evaluation scripts. The blind evaluation sets were written by
separate Claude sessions that did not open the training generators, the prompts, the templates or the other sets'
cases. Nearly every commit carries a Co-Authored-By: Claude line, and the Merge branch 'worktree-agent-…'
commits are parallel Claude Code sessions working in git worktrees. No training row was sampled from Claude: the
data is generated by code, and the talker's targets were written by a local Qwen3-4B and checked by the app's own
guards.
It stands on these projects and services: sherpa-onnx and k2-fsa's icefall models (wake word, recognisers, the speech runtime), ONNX Runtime, llama.cpp, LiteRT-LM, Google's BERT and FunctionGemma, Qwen3, Moonshine, Silero VAD, Piper voices and eSpeak NG, Whisper, NVIDIA Parakeet, casambi-bt and its forks, androidtvremote2, dadb, Bouncy Castle, Kotlin and Jetpack Compose, Hugging Face (hosting, transformers, PEFT), Wikipedia, Open-Meteo, Watchmode, USDA FSIS and FoodKeeper, CLINC150, and LibriVox's public-domain recordings. The full list, with licences, is in THIRD_PARTY_NOTICES.md.
- Source code: Apache License 2.0 (LICENSE, NOTICE). Copyright 2026 the PrivateAssistant
authors. The Casambi and Android TV modules are ports of Apache-2.0 projects (
casambi/NOTICE,androidtv/NOTICE). - Built APKs: the tablet APK (
:app) includes eSpeak NG (GPL-3.0-or-later) inside sherpa-onnx, so it is distributed under GPL-3.0-or-later as a combined work; our own code in it stays available under Apache-2.0 as well. Each GitHub Release carries its Corresponding Source: the tag's source archives, plus the eSpeak NG fork (csukuangfj/espeak-ngated530aa1) and sherpa-onnx v1.13.8, attached. The standalone Lights phone companion APK (:lights) contains no GPL dependencies and is distributed under Apache-2.0. - What is inside the APK, with each licence: THIRD_PARTY_NOTICES.md; the app shows it, with every licence text, in Settings → Tablet & privacy → Privacy → Open-source licences. Full texts: LICENSES/.
- Models and voices keep their own licences: the Gemma Terms of Use for FunctionGemma and our fine-tune of it, Apache-2.0 for Qwen and our talker, Apache-2.0 for the command model, MIT for Moonshine, Silero VAD and Whisper, public domain or CC licences for the voices. The bundled wake-word model is Apache-2.0 but was trained by k2-fsa on GigaSpeech, whose data terms are research-only; fine for this free project, worth checking for any commercial use (WAKE-WORD.md plans a replacement).
- Data files under other licences are marked in REUSE.toml: saved Wikipedia text in the tests and
llmeval/tools/, and the demo video, are CC BY-SA 4.0 (© Wikipedia contributors). - Attribution the app gives while running: "Weather data by Open-Meteo.com" (CC BY 4.0) under the weather, "Wikipedia says:" before a looked-up answer, the news publisher's name before its headlines, and "Data from Watchmode", linking to watchmode.com, wherever What to watch shows Watchmode's data (its free plan asks for it).
- What to watch uses each household's own Watchmode key. Watchmode's free plan is for non-commercial use, with attribution, and covers up to three countries; commercial use needs a paid plan.
- For forks: Open-Meteo's free API is for non-commercial use only. An app with subscriptions or advertising, or any commercial product, needs an Open-Meteo plan (and must keep the attribution).
Trademarks. Casambi, Samsung, Android, Google TV, Gemma, Amazon, Fire, Alexa, Netflix, YouTube, BBC, Watchmode and other names are trademarks of their owners, used here only to say what the app works with. This project is not affiliated with or endorsed by any of them.
Casambi. The Casambi support is an independent implementation, ported from open-source, reverse-engineered clients (casambi-bt and its forks). This project is not affiliated with, endorsed by or supported by Casambi Technologies Oy. Each household connects its own Casambi network with its own network password; the app carries no Casambi API key or shared credential.


