DEV Community

Cover image for I Turned My Grandmother's Voice Memos Into a Family Recipe Book, Fully Offline
Devashish Sunil Kachare
Devashish Sunil Kachare

Posted on

I Turned My Grandmother's Voice Memos Into a Family Recipe Book, Fully Offline

Many family recipes only exist in someone's head. Ask how much of an ingredient goes in and you'll hear "a handful," "until it smells right," or "you'll know." When that person is gone, the recipe goes with them.

For this challenge I built Recipe Keeper for a family member who cooks from memory and has never written their recipes down. You record yourself explaining a dish, and the tool turns that recording into a clean written recipe. All the recipes are then collected into one recipe book.

Everything runs on my own laptop, with no internet and no paid APIs.

Who it's for

It's for a family member whose cooking I'd hate to lose. They explain dishes out loud, mixing languages, estimating quantities, and jumping between steps. A normal recipe app doesn't fit that, but a voice memo does.

How it works
Record. The person explains a dish out loud, and the recording goes in a folder.
Transcribe. faster-whisper, an open-source implementation of Whisper, converts the audio to text locally.
Structure. A local open-weight model (Gemma, served through Ollama) turns the rambling transcript into JSON with a title, ingredients, steps, and personal tips.
Publish. A small Python script combines every recipe into one Markdown recipe book.

The core of the code is about 50 lines of Python:

python
segments, _ = whisper.transcribe(path)
text = " ".join(s.text.strip() for s in segments)

r = ollama.chat(
model="gemma3:4b",
messages=[{"role": "system", "content": PROMPT},
{"role": "user", "content": text}],
format="json",
)
recipe = json.loads(r["message"]["content"])
Designing around the hard parts

Spoken recipes are messy, so the prompt and pipeline were built around three problems:

Vague measurements. "A handful" isn't "50 grams." The prompt tells the model to keep vague amounts vague and never invent numbers, because a family recipe that says something the cook never said is worse than an imperfect one.
Mixed languages. People often switch languages mid-sentence. Using Whisper locally means I can try different model sizes and pick the one that handles the speech best.
Invented details. Language models like to fill gaps. Forcing JSON output and instructing the model to use only what was said keeps the result close to the original voice.
Why open source mattered here
Privacy. These are my family's voices and recipes. Nothing is uploaded to a server I don't control, and I'd have been uncomfortable sending a loved one's voice to a cloud API.
Works offline and costs nothing. Once the models are downloaded, it runs on a laptop with no internet and no per-recipe cost.
Swappable parts. Whisper size, the language model, and the prompt can each be changed independently. If a better open model comes out next month, I swap one line.
What's next
A photo for each dish
A simple app so a family member can record straight into the tool
Printing the recipe book as a keepsake
Code

Source code: https://github.com/deva5808/recipe-keeper.git

Thanks for reading. If you have a family member whose recipes only exist in their head, you can run this in an afternoon.

Top comments (0)