跳到正文
DEV Community· Kumuda ⚔️·· 2 小時前AI 評分48

Marigold /router:為不願遺忘的回憶打造私人追思祭壇

Marigold /router - A Private Ofrenda for the Memories We Refuse to Lose

AI 導讀

Marigold /router 是一個離線優先的口述歷史工作室與虛擬追思空間,用來保存家庭回憶、照片、食譜和語音備忘錄,不會把親人塑造成聊天機械人。資料儲存在瀏覽器本機,無須帳戶、資料庫或雲端服務;完整 AI 功能使用 Ollama 和 Gemma 4 e4b,Faster-Whisper 則可選擇用於本機語音轉錄。追思指南只根據檔案內容回答,缺少資料時會拒絕猜測。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Some memories are not dramatic enough to become history.

They are a cup warmed before tea is poured.

A song playing from an old radio at dusk.

A yellow sari in a garden.

The exact way someone said, “Stay a little longer.”

These details are easy to lose because they are ordinary. But ordinary details are often where a person continues to exist in our lives.

So I built Marigold /router: an offline-first oral-history studio and virtual ofrenda for collecting family memories, photographs, recipes, and voice notes.

It is a place to keep what matters without turning a loved one into a chatbot.

The central idea is simple:

Marigold remembers what you give it. It refuses to invent what you did not.

The project was inspired by the challenge theme, Ghost in the Machine, and by the tension between memory and artificial intelligence.

A machine can search a memory.

It can help organise a memory.

It can transcribe a voice recording.

But it should not pretend to become the person in the recording.

That boundary is the heart of Marigold.

Demo

💻 Source code: https://github.com/kumudasrip/marigold-router

🎬 Demo: https://youtu.be/t74MdHNO8nM?si=TRmUi6bRflMOHTtK
Marigold currently runs locally because privacy is part of the product, not just a deployment limitation.

Run the browser app

git clone https://github.com/kumudasrip/marigold-router.git
cd marigold-router
py -m http.server 4173

Open:

http://localhost:4173

The archive works without an account, database, or cloud service.

For the full AI experience, install Ollama and pull the local Gemma model:

ollama pull gemma4:e4b

The optional Faster-Whisper service enables real audio-to-text transcription.

What Marigold Can Do

1. Build a private memory archive

You can add:

  • Written stories
  • Photographs
  • Voice notes
  • Years and dates
  • Sources and family context
  • Thematic tags

Memories are stored in the browser's local storage. There is no account system and no required cloud database.

The archive includes search, filters, a timeline, and a memory detail drawer so that small fragments can be revisited later.

2. Create an ofrenda-like memory space

I wanted the interface to feel like a place of keeping rather than another dashboard.

The design uses:

  • Marigold orange
  • Candle yellow
  • Terracotta
  • Deep altar red
  • Parchment-inspired surfaces
  • A hand-crafted Marigold /router logo
  • Decorative details inspired by papel picado and altar arrangements

The visual language is intentionally warm. The archive should feel calm enough to stay with a memory for a while.

3. Ask the Ofrenda Guide

The Guide lets you ask questions about the archive.

For example:

What did they love to cook?

If the archive contains a relevant memory, the Guide retrieves it and points to the source.

If the archive does not contain the answer, it says:

“That memory is not in the archive yet. I won't fill the silence with a guess.”

This is the most important behaviour in the application.

A convincing answer is not always a responsible answer.

4. Transcribe voice notes locally

A voice note can contain details that someone might never sit down to type.

Marigold optionally uses Faster-Whisper through a small local FastAPI service:

Audio file
    ↓
Local Faster-Whisper service
    ↓
Transcript
    ↓
Memory saved in the browser archive

The audio is sent to 127.0.0.1, not to a hosted transcription provider.

The transcript is attached to the saved memory, while the original audio remains available locally in the browser archive.

5. Export the archive

The archive can be exported as a standalone HTML file.

The exported memorial includes:

  • Memory titles
  • Written details
  • Dates
  • Sources
  • Tags
  • Uploaded photographs

The goal is to make the archive portable without requiring a Marigold server.

How I Built It

Marigold is intentionally built with a small, understandable stack:

  • HTML for the application structure
  • CSS for the responsive ofrenda-inspired design
  • Vanilla JavaScript for archive interactions and local state
  • Browser localStorage for private memory persistence
  • Ollama for local model inference
  • Gemma 4 e4b for curation and grounded Guide responses
  • Faster-Whisper for local multilingual transcription
  • FastAPI for the optional local transcription service
  • Uvicorn for running the Whisper service

There is no required npm build step and no Marigold backend.

The main app communicates with Ollama directly:

Marigold browser app
        │
        ├── localStorage
        │
        ├── Ollama
        │     └── Gemma 4 e4b
        │
        └── FastAPI localhost service
              └── Faster-Whisper

Where the AI Actually Earns Its Place

I did not want to add AI just because the challenge had “AI” in the title.

The local model has real, limited responsibilities.

1. Curating themes

The Curator reads archive context and suggests thematic threads such as:

  • Kitchen
  • Garden
  • Music
  • Ritual
  • Belonging

These are suggestions, not facts about a person.

2. Grounded retrieval

The Ofrenda Guide receives the archive context and the user's question.

It is instructed to:

  • Answer only from the archive
  • Never impersonate the deceased
  • Never invent missing details
  • Return source references
  • Refuse unsupported questions

The frontend also keeps a deterministic fallback retrieval mode so the app remains useful when Ollama is offline.

3. Transcript cleanup

When a transcript is pasted into the AI Studio, Gemma can help clean punctuation and paragraph breaks while preserving the original meaning.

4. Audio transcription

Faster-Whisper handles actual voice-to-text conversion locally.

This is especially useful because oral history is often easier to speak than to type.

Why Gemma and Local Inference?

A cloud model would have made the first demo simpler.

But a memory archive is exactly the kind of application where sending everything to a remote API should not be the default.

Using Ollama and Gemma makes the project:

  • More private
  • Usable without an AI subscription
  • More transparent
  • Easier to run offline
  • Easier to inspect and modify
  • Independent of changing hosted API limits

The model can be replaced locally without changing the product architecture.

The user controls where inference happens.

That is important when the data includes family stories, grief, cultural history, or private recordings.

Why Does Open Innovation Matter?

Open innovation matters here because the project depends on trust.

A closed API might give a polished answer, but it would make it harder to understand:

  • Where the answer came from
  • What data left the device
  • Which model produced the response
  • What happens when the model is wrong
  • Whether the service will remain available

With local, open tools, the system is more inspectable.

Someone can see that:

  • Memories are stored in browser storage
  • Ollama is called through a local endpoint
  • Faster-Whisper runs on localhost
  • The Guide prompt explicitly prohibits impersonation
  • Unsupported answers fall back to a refusal
  • The export is generated locally

Open innovation made it possible to build a project where privacy is not a marketing sentence. It is part of the implementation.

It also made experimentation accessible. I could combine a static frontend, Ollama, Gemma, Faster-Whisper, and FastAPI without needing a paid infrastructure stack or a large production backend.

What I Learned While Building It

Local AI is not automatically responsible AI

Running a model locally improves privacy, but it does not automatically make the output trustworthy.

The important work was defining what the model should refuse to do.

The Guide is not allowed to recreate a person or confidently fill in missing history. The refusal behaviour is as important as the successful answer.

Small models need clear boundaries

A local model performs better when the prompt is narrow and the expected output is explicit.

For curation, Marigold asks for structured JSON.

For the Guide, it provides numbered archive entries and expects citation indexes.

For transcript cleanup, it asks the model to preserve every word and meaning.

The more specific the task, the more useful the local model becomes.

Fallbacks matter

Ollama may not be running.

Whisper may not be installed.

A model may take too long to respond.

The archive should still open, search, save memories, and provide honest fallback behaviour.

AI is an enhancement to the archive, not the foundation that everything else depends on.

The UI is part of the emotional design

A memory archive cannot feel like an admin panel.

The visual design needed to communicate care before the user ever clicked an AI button.

The warm palette, altar-inspired layout, candle details, and marigold branding are all part of making the project feel like a place people want to return to.

Responsible AI Decisions

Marigold follows a few simple rules:

  • Do not impersonate the deceased.
  • Do not fabricate memories.
  • Do not present guesses as family history.
  • Show where retrieved information came from.
  • Say when information is missing.
  • Keep the data local by default.
  • Use synthetic or consented data for demonstrations.
  • Treat browser storage as convenient local persistence, not encryption.

The project is not trying to make a ghost.

It is trying to make the silence around a missing memory honest.

The Spirit of It

The moment that stayed with me was not the model producing a clever answer.

It was the refusal.

I asked the Guide something that was not actually present in the archive, and instead of inventing a warm-sounding response, it said that the memory was not there yet.

That felt more meaningful than a perfect answer.

Because grief already contains enough imagined conversations.

A tool for remembering should not pretend that it can bring someone back.

It should help us hold on to what was actually said, photographed, recorded, cooked, sung, and lived.

That is what Marigold /router is for:

A record of love, not a reconstruction.

Prize Categories

  • Best Use of Gemma

Code

https://github.com/kumudasrip/marigold-router

The repository includes setup instructions for:

  • The static browser app
  • Ollama and Gemma 4 e4b
  • Faster-Whisper
  • The local FastAPI transcription service
  • Privacy and troubleshooting notes

來源:DEV Community · dev.to