DEV Community

Avrojit Dutta
Avrojit Dutta

Posted on AI-assisted

HearthLore - Preserving the Recipes, Voices & Stories of Home

HearthLore: Preserving the Recipes, Voices, and Stories of Home

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.

What I Built

HearthLore is an AI-powered family recipe and oral history preservation app built for the people in our lives whose best dishes exist only in memory, voice notes, and casual conversations rather than neat cookbooks.

Think of that one relative who explains a dish with phrases like:

"Bas thoda sa daalna hai... jab tak khushboo na aaye tab tak pakao."

Everyone at the table knows exactly what that tastes like, but nobody actually has the measurements written down. The instructions rely on intuition and aroma, and the stories tied to those meals risk being lost when the person who cooks them is no longer around.

HearthLore lets you record a family member talking through a recipe naturally in their own language. The application takes that spoken audio and handles the heavy lifting:

  • Transcribes the recording using Whisper
  • Detects the spoken language automatically
  • Interprets the raw transcript using Gemma
  • Extracts structured ingredients, measurements, and cooking steps
  • Preserves the verbatim original transcript alongside the parsed recipe
  • Stores everything in MongoDB Atlas so it stays accessible for the family

The aim is not simply running speech-to-text. It is about keeping a piece of family heritage intact.

Demo and Code

The frontend is live on Render. The AI pipeline runs locally for this demo, as Render's free tier has a 512 MB memory threshold that cannot comfortably load the Whisper and PyTorch runtime. The production backend can be hosted on a dedicated instance with sufficient RAM.

This is a solo project: I handled the design, pipeline architecture, API integration, and deployment.

How It Works

The data flows through a straightforward pipeline:

  1. Voice Input: User records or uploads an audio clip of a family member explaining a dish.
  2. Audio Processing: Whisper transcribes the speech and identifies the primary language.
  3. Structured Extraction: Gemma analyzes the transcript via Ollama, separating actual kitchen steps from conversational banter.
  4. Data Persistence: The parsed recipe, metadata, and original transcript are saved to MongoDB Atlas.
  5. Presentation: The React interface displays the clean recipe side-by-side with the original transcript and audio context.

Tech Stack

  • Frontend: React, Vite, JavaScript, CSS
  • Backend: Python, FastAPI, Whisper, Ollama (Gemma)
  • Database: MongoDB Atlas
  • Hosting: Render

Open-Source AI and Why It Matters

Instead of routing personal recordings to a closed, third-party recipe generator, HearthLore relies on open-source AI tooling: Whisper for speech recognition and Gemma (via Ollama) for comprehension and extraction.

Family memories and personal voices are sensitive. Uploading intimate audio to a black-box commercial service felt counter to the spirit of the project. Using open models allowed me to keep data pipelines transparent, run inference locally, and tune prompts specifically around how families actually talk about food:

  • Understanding multi-lingual code-switching
  • Preserving approximate measurements instead of fabricating exact grams
  • Converting free-form narratives into step-by-step instructions
  • Distinguishing kitchen instructions from personal anecdotes without throwing the stories away
  • Acknowledging gaps when a detail was left unspoken, rather than hallucinating ingredients

Whisper provides the listening layer, Gemma provides the language understanding, and MongoDB Atlas provides the long-term memory.

Development Workflow

I developed HearthLore iteratively, pairing manual coding with AI-assisted debugging sessions to tune prompt constraints for Gemma, debug memory constraints during local audio transcription, and streamline the FastAPI endpoints.

Challenge Categories

  • Render (Best Use of Render): Deployed the frontend client and structured the repository for modular production hosting.
  • Gemma (Best Use of Gemma): Gemma powers the core extraction engine, converting messy spoken transcripts into reliable culinary steps without losing conversational context.
  • MongoDB Atlas: Serves as the primary operational database, keeping structured recipes, raw transcripts, and metadata indexed and queryable.

Author

Some of the most valuable culinary knowledge never makes it into print. It lives in someone's cadence, their memories, and their kitchen habits. HearthLore exists so those recipes and the voices behind them remain part of the family table for years to come.

Top comments (0)