Ebyafaayo: keeping my grandparents' stories alive with Gemma 4, offline
This is a submission for the Hacktoberfest Open-Source AI Challenge: Ghost in the Machine. What I Built Ask a young person in Kampala today what their clan is, and many will pause. Ask about their totem, the
This is a submission for the Hacktoberfest Open-Source AI Challenge: Ghost in the Machine.
What I Built
Ask a young person in Kampala today what their clan is, and many will pause. Ask about their totem, the taboos their family keeps, or the names of their great-grandparents, and the pause gets longer.
I see it in my own generation. We grew up with phones, school and the city, and somewhere along the way we stopped sitting with our grandparents in the evening to listen. The knowledge did not disappear because it was unimportant. It disappeared because nobody wrote it down. In our culture, history lives in the voices of our jjajjas: who our people were, where they came from, which clan we belong to, what we must never eat, why a child is given a certain name, the proverbs that taught right from wrong.
Every time an elder passes on, a whole library closes, and most of those libraries were never written down.
That is why I built Ebyafaayo, which means "history" in Luganda. It lets a family sit with jjajja omusajja or jjajja omukazi, press record, and keep their stories in their own words, in Luganda, for the generations that come after us. Everything stays on the family's own laptop.
- The family asks the elder for consent and records the story.
- An open Luganda speech model transcribes it.
- The family checks and corrects the transcript.
- Gemma 4, running locally, turns it into a memory: the story in Luganda and English, the people and places mentioned, the clan and totem if the elder named them, proverbs, and gentle questions to ask next time.
- Each elder gets a remembrance page, and the family can print a memory book.
Gemma is only allowed to use what the elder actually said. Every name, place and relationship links back to the sentence it came from, and anything unclear stays marked as unclear. A family's history is not something an AI should guess.
Demo
These screenshots use a short sample story written for testing, not a real family's story.
Consent comes first. The consent text is stored with the recording.

The memory Gemma wrote. Every person, place and time links to the sentence it came from. Clan and totem stay empty because the elder did not say them.

The remembrance page, with a timeline and questions to ask next time.

The memory book, ready to save as a PDF.

Code
Ebyafaayo
An offline family oral-history keeper for Luganda speakers. Record an elder telling a story, get a transcript from an open Luganda speech model, correct it together, and let Gemma 4 (running on your own laptop) turn it into a family memory: the story in clean Luganda, an English translation, the people, places and times mentioned, and gentle questions to ask next time. Every story goes onto a remembrance page for that elder and into a printable memory book.
Nothing leaves the computer. No cloud AI, no analytics, no telemetry.
Ebyafaayo is Luganda for history: the things that happened.
Built for the DEV Hacktoberfest Open-Source AI Challenge, Week 4: "Ghost in the Machine".
The story behind it
Ask a young person in Kampala today what their clan is, and many will pause. Ask about their totem, the taboos their family keeps, or the names of their great-grandparents, and the pauseโฆ
How I Built It
-
Gemma 4 (
gemma4:e2b) through Ollama does the thinking. It cleans the transcript, translates Luganda to English, and pulls out the people, places, time periods, clan, totem and proverbs as structured JSON. Every item must quote its source sentence, and Pydantic validates the JSON before it is saved. I chose E2B because my laptop has 8 GB of RAM and no GPU; the bigger Gemma 4 models do not fit. -
Sunbird AI's open speech model
asr-whisper-large-v3-salt(MIT licence, adapted from Whisper Large v3 for Ugandan languages) transcribes Luganda. I convert it once to an 8-bit version for faster-whisper. It is the same Sunbird weights, but it needs about 1.5 GB of RAM instead of 6 GB. - The Gemma audio test did not happen. I planned to test whether Gemma 4 could transcribe Luganda directly. But Gemma 4 E2B in Ollama only takes text and images, and the other route needs another ~10 GB download that my laptop could not hold. So Sunbird does the listening and Gemma does the writing.
- FastAPI and SQLite keep everything on one laptop. React with MUI for the interface.
Problems I hit along the way:
- Out of memory. The first time Gemma loaded, Linux's out-of-memory killer stopped it, and my editor went with it. Now Ollama runs in its own memory-capped service, and the app runs one heavy job at a time: Gemma is unloaded before transcription, and the speech model is dropped afterwards.
- One big prompt was too much for a small model. Asked for everything at once, Gemma E2B sometimes returned every list empty. Splitting the work into two focused calls fixed it: one for the text and translation, one for people, places and times. After that it found every person with the right relationship (father, mother, husband), every place and every date in my test story.
- A runaway loop. Once, Gemma wrote the same Luganda word over and over for eight minutes. Now every field in the JSON schema has a maximum length and every list a maximum size, and Ollama enforces them while Gemma writes.
- Gemma still makes up facts in translation. In one test, "that is where I met my husband" came out as "my husband was killed". The app checks every quote and name against the transcript, and it drops any clan or totem the elder never said. But it cannot check a translation, so the family's review matters most there.
I wrote the build spec (the rules on consent, honesty and the stack) and built the app with an AI coding agent. Here is the session, trimmed to the real development work:
Why Does Open Innovation Matter?
Family stories are private. Many families would never upload a grandmother's voice to a company's server, and many Ugandan homes do not have steady internet. With open-weight models, Ebyafaayo runs fully offline on a laptop, costs nothing per story, and keeps every recording in the family's hands.
Open models also mean our languages can grow. Sunbird AI trained an open model for Luganda and other Ugandan languages, and anyone can build on it. Closed tools rarely serve languages like ours first. Open ones let us do it ourselves.
Prize Categories
Gemma
Credits
- Gemma 4 by Google DeepMind (open weights)
-
Sunbird/asr-whisper-large-v3-saltby Sunbird AI (MIT) - Ollama, faster-whisper, FastAPI, React, MUI
- Built with help from an AI coding agent (Claude Code); the session is embedded above, and a summary of the decisions is in the repo at
docs/agent-log.md.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.