跳到正文
DEV Community· Bidhan Ranjan Bhoi·· 3 小時前AI 評分28

Echoes in the Machine:讓被遺忘的回憶在本機發聲

Echoes in the Machine — Giving Forgotten Memories a Local Voice

AI 導讀

Echoes in the Machine 是一款以私隱為先的本機 AI 回憶檔案庫,將照片、文件、錄音和故事整理成可搜尋、可對話的個人記憶。它使用 RAG 從本機向量資料庫檢索相關回憶,並以 Whisper 將錄音轉成文字,設計上盡可能在本機處理資料。

正文

What I Built

Echoes in the Machine is a privacy-first AI memory archive designed to preserve the stories, voices, photographs, documents, and personal memories that time slowly makes harder to reach.

The idea is simple:

What if the memories of the past could still speak, without ever leaving your computer?

Instead of uploading personal memories to a closed AI service, the application uses local/open AI technologies to turn those memories into a searchable, conversational archive.

The “ghost” in the machine isn't supernatural.

It is the past, quietly living inside the machine.


Core Features

1. Memory Vault

Users can create their own private digital memory archive.

The archive can contain:

  • Old photographs
  • Scanned letters
  • Personal documents
  • Text memories
  • Voice recordings
  • Family stories
  • Important dates
  • People and relationships
  • Places and events

Each memory becomes part of a structured personal archive rather than simply being stored as an isolated file.


2. AI Memory Understanding

When a memory is added, the system processes its content using AI.

For example, an old photograph might contain information about:

  • People
  • Places
  • Approximate events
  • Objects
  • Visible text
  • Context provided by the user

A voice recording can be transcribed into text, while documents can be extracted and converted into searchable content.

The goal is to transform unstructured memories into information that AI can actually understand and retrieve.


3. Ask the Archive

This is the heart of the project.

Instead of searching files manually, users can ask questions naturally:

“What stories do we have about Ramesh?”

“Who used to sing on Sunday mornings?”

“Which memories mention our old house?”

“What do we know about the trip to Puri?”

The system searches the user's memory archive and generates an answer based on the retrieved memories.

This turns a folder of old files into something that feels more like a conversation with the past.


4. Local RAG Memory Search

The application uses Retrieval-Augmented Generation (RAG) rather than allowing the AI to freely invent answers.

The process is:

User Question → Embedding → Semantic Search → Relevant Memories → Local AI → Grounded Answer

Relevant memories are retrieved from the local vector database and provided to the language model as context.

This means the AI is encouraged to answer from the archive rather than simply relying on what it learned during model training.


5. Voice Memory Transcription

Old voice recordings can be difficult to search because their information is trapped inside audio.

Echoes in the Machine uses an open speech-to-text model such as Whisper to convert recordings into searchable text.

For example:

Audio → Whisper → Transcript → Embeddings → Memory Archive

A recording that was previously impossible to search can now become part of the same memory system as photographs and documents.


6. Semantic Search

The archive doesn't depend only on exact keywords.

A user might search:

“memories about childhood”

and still discover a memory containing:

“Every summer, we stayed at our grandparents' house near the river.”

The system uses embeddings to understand the meaning behind the query rather than simply matching identical words.

This makes the archive much closer to how humans remember things.


7. Memory Connections

Memories are rarely isolated.

One photograph may contain a person who appears in a letter. That letter may mention a location. The location may appear in an audio recording.

Echoes in the Machine can represent these relationships as connected memories:

Person → Place → Event → Photograph → Story

This creates the foundation for a personal memory graph where different pieces of someone's history can connect with each other.


8. Memory Cards

Important people or memories can be organized into dedicated memory cards.

For example:

Ramesh

1968 – 2012

Known memories

  • Family gatherings
  • Sunday singing
  • Childhood stories
  • Puri trips
  • Favorite songs

Instead of looking through hundreds of files, users can see a meaningful summary of the memories associated with a person.


9. Privacy-First Architecture

Privacy isn't an additional feature.

It is the reason the project exists.

Personal photographs, family conversations, letters, and recordings can be extremely sensitive.

The architecture is therefore designed around local processing wherever possible.

Instead of:

Private Memory → Cloud API → AI Provider

the intended architecture is:

Private Memory → Local Processing → Local Vector Database → Local AI

This gives users greater control over their own memories and reduces dependence on external AI providers.


10. Model Freedom

The application is designed around open AI technologies rather than a single proprietary model.

The language model can potentially be replaced with another compatible open-weight model depending on the user's hardware and requirements.

For example:

  • Smaller model for ordinary laptops
  • Larger model for powerful machines
  • Different model for better multilingual performance
  • Different model after future fine-tuning

The archive should belong to the user—not to a particular AI provider.


How I Built It

The project is designed as a local-first AI application with several layers.

Frontend

The user interface can be built using:

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Framer Motion

The interface focuses on making the archive feel less like a technical AI dashboard and more like a quiet digital memory space.

The main areas include:

  • Memory Vault
  • Add Memory
  • Memory Cards
  • Search
  • Ask the Archive
  • Connected Memories
  • Memory Details

Memory Ingestion Pipeline

When a user adds a memory, the application identifies the type of content and sends it through the appropriate processing pipeline.

For example:

Image

Image → Metadata/Vision Processing → Text/Description → Embedding

Document

PDF/TXT → Text Extraction → Chunking → Embedding

Audio

MP3/WAV → Whisper → Transcript → Chunking → Embedding

Manual Memory

User Input → Structured Memory → Embedding

The resulting information is stored locally and becomes searchable.


Embeddings

After extracting useful information from a memory, the text is converted into numerical vector representations using an embedding model.

These vectors allow the system to compare the semantic meaning of memories.

For example:

“Grandfather used to tell stories near the old mango tree.”

and

“Stories from my grandfather under the mango tree.”

may use different words, but their embeddings can still be very similar.

That is what makes semantic memory retrieval possible.


Vector Database

The embeddings are stored in a local vector database such as ChromaDB.

Each stored memory can contain:

  • Original content reference
  • Extracted text
  • Embedding
  • Memory type
  • Person
  • Location
  • Date
  • Metadata

When a user asks a question, the question is embedded and compared against the stored vectors.

The most relevant memories are then retrieved.


RAG Pipeline

The question-answering system follows a simple RAG pipeline:

User Question
      ↓
Question Embedding
      ↓
Vector Search
      ↓
Top Relevant Memories
      ↓
Context Construction
      ↓
Local Open-Weight LLM
      ↓
Grounded Response

The model receives the retrieved memories as context and generates the response from that information.

This makes the archive conversational while keeping the underlying memories under the user's control.


Local AI

For local inference, the project can use a runtime such as Ollama together with a compatible open-weight model.

The architecture intentionally keeps the model layer replaceable.

That means the application doesn't need to be permanently tied to one provider or one model.

The same archive can potentially continue working even if the user changes models later.


Speech Processing

For voice memories, Whisper can be used locally for transcription.

The pipeline becomes:

Voice Recording
      ↓
Local Whisper
      ↓
Transcript
      ↓
Text Chunking
      ↓
Embeddings
      ↓
ChromaDB
      ↓
Ask the Archive

This makes spoken memories searchable alongside written memories.


Storage

The original files remain associated with their processed memory records.

A local storage layer can contain:

/memories
    /photos
    /audio
    /documents
    /notes

/database
    memory.db

/vector-store
    chroma/

This keeps the archive organized and makes it possible to preserve the relationship between the original memory and its AI-generated representation.


Overall Architecture

                 ECHOES IN THE MACHINE

                       USER
                        │
                        ▼
                ┌───────────────┐
                │ Memory Vault  │
                └───────┬───────┘
                        │
          ┌─────────────┼─────────────┐
          ▼             ▼             ▼
       Photos        Documents       Audio
          │             │             │
          ▼             ▼             ▼
       Vision       Text Extract    Whisper
          │             │             │
          └─────────────┼─────────────┘
                        ▼
                 Text / Memories
                        │
                        ▼
                  Embeddings
                        │
                        ▼
                   ChromaDB
                        │
                        ▼
                  Semantic Search
                        │
                 User Question
                        │
                        ▼
                    RAG Layer
                        │
                        ▼
                Local Open-Weight
                     LLM
                        │
                        ▼
                 Memory Answer

Why Open Innovation Matters

The most important part of this project isn't simply that an open model was used.

It is where the AI is being used.

A family archive may contain photographs, voices, addresses, letters, private conversations, and stories that were never meant to become someone's cloud dataset.

Open and local AI provides an alternative.

It makes it possible to build systems where:

  • Data can remain on the user's machine.
  • AI processing can happen locally.
  • Models can be replaced.
  • Models can potentially be fine-tuned.
  • Developers can inspect and modify the surrounding system.
  • Users are less dependent on a single AI provider.
  • The application can continue evolving without rebuilding everything around one closed API.

For personal memories, that control matters.


來源:DEV Community · dev.to