Project O.L.I.V.I.A.
AI companion with persistent memory, voice, and dreaming
Role
Solo Developer & Researcher
Duration
Ongoing
Tech Stack
9 technologies
About This Project
Project O.L.I.V.I.A. started as a question: what would it take to build an AI companion that actually remembers you? Not just within a single conversation, but across weeks and months. The answer became the Offline Local Intelligent Voice Interactive Assistant, a voice companion that runs entirely on local hardware. There are no cloud APIs, no telemetry, and no subscription, and conversations never leave the machine.
Voice runs over a single WebSocket. Mic audio streams in, faster-whisper with Silero VAD turns it into text, a local model served through Ollama streams a reply, and ChatterBox speaks it in a cloned voice, sentence by sentence as the reply is generated. You can interrupt her mid-sentence and she stops. Because audio stays on the client, the backend can live on a home-server GPU while a Flet desktop app or the console client handles the mic.
Memory is what makes it a companion rather than a chatbot. Conversations are stored in ChromaDB, facts are extracted from them automatically, and a background "dreaming" process consolidates what was said into longer-lived memories while old conversational detail expires. Relevant memories are injected into each turn, so she can recall something from last week without the whole history sitting in the context window.
The project is run like an engineering effort with receipts. Every turn is timed stage by stage, peak VRAM is logged, and benchmark results are committed to the repository. When measurements contradicted the plan, such as the GPU having half the VRAM the plan assumed, or the latency hiding before the first instrumented stage, the corrections were written up openly. QLoRA fine-tuning of a custom companion model is in progress, and the core is open source under MIT.
Key Features
- ◆Full-duplex voice over one WebSocket: mic audio in, streaming speech-to-text, LLM, and text-to-speech out
- ◆Barge-in: interrupt her mid-sentence and she stops talking
- ◆Speech is spoken sentence by sentence as the LLM streams, rather than after the full reply
- ◆Persistent memory in ChromaDB with automatic fact extraction, background consolidation ("dreaming"), and time-based pruning, all manageable over a REST API
- ◆Streaming text chat over Server-Sent Events, plus a runtime settings API that applies changes without a restart
- ◆A Flet desktop app with mic capture, and a console client
- ◆Latency instrumentation: per-stage timing for every turn, peak VRAM tracking, and benchmark results committed to the repo
- ◆Personas and voice references are kept out of git by design; the repo ships templates only
Challenges
Keeping latency low in a cascade of three models, which meant finding where the time actually went: most of it was spent deciding the speaker had stopped, before any instrumented stage
Fitting an LLM, speech recognition, and voice cloning into 8 GB of laptop VRAM, half of what the original plan assumed
Remembering across weeks of conversation without overflowing the context window
Recording corrections openly when measurements contradicted the plan, instead of quietly patching the docs
Outcomes
- ✓The whole voice pipeline runs offline on a single consumer GPU
- ✓Open source under MIT, with CI running tests on Windows and Linux, lint, a coverage ratchet that only goes up, and a pip-audit security gate
- ✓QLoRA fine-tuning of a custom companion model is in progress, with fit verified on local hardware
Tech Stack
Want to talk about this project?
Questions, collaboration, or overlapping research: send a raven.
Get in Touch