<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sushant Singh Negi</title>
    <description>The latest articles on DEV Community by Sushant Singh Negi (@devnegi).</description>
    <link>https://dev.to/devnegi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Sushant Singh Negi</title>
      <link>https://dev.to/devnegi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devnegi"/>
    <language>en</language>
    <item>
      <title>Echoes of an Era: Building a Grounded AI Time Capsule from My Grandfather’s Voice</title>
      <dc:creator>Sushant Singh Negi</dc:creator>
      <pubDate>Sun, 04 Oct 2026 12:49:55 +0000</pubDate>
      <link>https://dev.to/devnegi/echoes-of-an-era-building-a-grounded-ai-time-capsule-from-my-grandfathers-voice-160n</link>
      <guid>https://dev.to/devnegi/echoes-of-an-era-building-a-grounded-ai-time-capsule-from-my-grandfathers-voice-160n</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Echoes of an Era&lt;/strong&gt; is an open-source, retrieval-grounded AI voice memory capsule built specifically for my grandfather. It preserves, organizes, indexes, and makes searchable his authentic life stories and oral history without turning the AI into a fictionalized, hallucinatory avatar of him.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem It Solves
&lt;/h3&gt;

&lt;p&gt;My grandfather lived through a world that no longer exists—growing up in the 1950s, communicating via weekly inland letters, experiencing the transformation of traditional family customs, and observing decades of societal change. Our family captured hours of his stories on voice recorders, but like most personal audio archives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Voice recordings are unsearchable:&lt;/strong&gt; Audio files are linear and opaque. You cannot &lt;code&gt;Ctrl+F&lt;/code&gt; a voice recording.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stories lose context over time:&lt;/strong&gt; Unlabelled files sitting in folders become difficult for future generations to explore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The AI Hallucination Trap:&lt;/strong&gt; Generic cloud chatbots are trained to be helpful, which often means they fabricate heartwarming but entirely fake personal memories when asked questions they don't know the answer to.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Core Philosophy
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"AI interprets the memories. It does not create the memories."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This application is &lt;strong&gt;not&lt;/strong&gt; an AI pretending to be my grandfather. It &lt;strong&gt;is&lt;/strong&gt; an AI-powered interface to my grandfather's authentic, recorded voice. His original voice recordings remain the single source of truth.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🎙️ &lt;strong&gt;Audio Memory Vaulting:&lt;/strong&gt; Upload and store raw voice recordings (&lt;code&gt;.mp3&lt;/code&gt;, &lt;code&gt;.wav&lt;/code&gt;) up to 10MB per file with automatic PyAV audio metadata decoding.&lt;/li&gt;
&lt;li&gt;📝 &lt;strong&gt;Timestamped Speech-to-Text:&lt;/strong&gt; Verbatim transcription using &lt;code&gt;faster-whisper&lt;/code&gt; with voice activity detection (VAD) and auto-detected language support (Hindi, Hinglish, English).&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Structured Memory Extraction:&lt;/strong&gt; Automatically extracts titles, summaries, historical eras, locations, people mentioned, emotions, verbatim quotes, and life advice using &lt;code&gt;gemma3:1B-Q4_K_M&lt;/code&gt; running locally through Docker Model Runner.&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;1024-Dimensional Vector Search:&lt;/strong&gt; High-density semantic indexing using local &lt;code&gt;BAAI/bge-m3&lt;/code&gt; via &lt;code&gt;SentenceTransformers&lt;/code&gt; stored in PostgreSQL with &lt;code&gt;pgvector&lt;/code&gt; HNSW vector indexes.&lt;/li&gt;
&lt;li&gt;🔍 &lt;strong&gt;Hybrid Retrieval Engine:&lt;/strong&gt; Combines dense vector similarity with keyword/lexical field scoring re-ranked via Reciprocal Rank Fusion (RRF).&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;Grounded Q&amp;amp;A ("Ask Grandfather"):&lt;/strong&gt; Answers user questions strictly using retrieved memory context, refusing to fabricate answers when evidence is insufficient.&lt;/li&gt;
&lt;li&gt;🎧 &lt;strong&gt;Interactive Audio Player &amp;amp; Timestamps:&lt;/strong&gt; Direct, range-supported HTTP audio streaming (&lt;code&gt;206 Partial Content&lt;/code&gt;) that jump-cuts to the exact second where grandfather spoke the retrieved memory.&lt;/li&gt;
&lt;li&gt;📜 &lt;strong&gt;Chronological Era Timeline:&lt;/strong&gt; Explore memories grouped chronologically across eras (1940s to present) and filter by thematic categories.&lt;/li&gt;
&lt;li&gt;⏳ &lt;strong&gt;"Then vs Now" Reflections:&lt;/strong&gt; Compare historical experiences described by grandfather (THEN) against modern realities (NOW), generating generational reflection questions and enduring values.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fle7rpr2z0umwojbb1w9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fle7rpr2z0umwojbb1w9y.png" alt=" " width="799" height="291"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Home Page Dashboard &amp;amp; Audio Memory Vault&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftwfjrz5mf89w54y787nl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftwfjrz5mf89w54y787nl.png" alt=" " width="800" height="422"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Grounded Q&amp;amp;A Interface ("Ask Grandfather")&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkggditt5r53crgqo1ijj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkggditt5r53crgqo1ijj.png" alt=" " width="799" height="457"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Signature "Then vs Now" Historical Reflections Engine&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fws86f1wufbmyshinjy0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fws86f1wufbmyshinjy0i.png" alt=" " width="800" height="513"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Decade-based Memory Categorization&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Video Demo:&lt;/strong&gt; [&lt;a href="https://youtu.be/73hLP9b_y4M" rel="noopener noreferrer"&gt;https://youtu.be/73hLP9b_y4M&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; [&lt;a href="https://github.com/NegiSushant/Echoes-of-an-Era" rel="noopener noreferrer"&gt;https://github.com/NegiSushant/Echoes-of-an-Era&lt;/a&gt;]
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/NegiSushant/Echoes-of-an-Era.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Architecture &amp;amp; System Flow
&lt;/h3&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TB
    subgraph Frontend Client Layer
        React[React 18 UI - Tailwind CSS]
        Player[Docked Audio Player Component]
        SDK[Client API Layer - api.js]
    end

    subgraph Backend Layer FastAPI
        API[FastAPI Core Application]
        STT[TranscriptionService - faster-whisper]
        Embed[EmbeddingService - BAAI/bge-m3]
        Extract[MemoryExtractorService]
        Retriever[RetrievalService - Hybrid Engine]
        RAG[RAGService - Grounded QA]
        Comp[ComparisonService - Then vs Now]
    end

    subgraph Local LLM Engine
        DMR[Docker Model Runner]
        Gemma[Gemma 3 1B Q4_K_M]
    end

    subgraph Storage &amp;amp; Database Layer
        PG[(PostgreSQL 16)]
        PGVector[pgvector Extension - Vector 1024]
        HNSW[HNSW Vector Index]
        AudioStore[File Storage ./uploads/audio]
    end

    React --&amp;gt; SDK
    React --&amp;gt; Player
    SDK --&amp;gt;|REST API| API

    API --&amp;gt; STT
    API --&amp;gt; Extract
    API --&amp;gt; Embed
    API --&amp;gt; Retriever
    API --&amp;gt; RAG
    API --&amp;gt; Comp

    RAG --&amp;gt;|Grounded Context| DMR
    Extract --&amp;gt;|Extraction Prompt| DMR
    Comp --&amp;gt;|Comparison Prompt| DMR
    DMR --&amp;gt; Gemma

    Retriever --&amp;gt; Embed
    Retriever --&amp;gt;|Vector + Lexical Query| PGVector
    Embed --&amp;gt;|1024-dim Vector| PGVector
    PGVector --&amp;gt; HNSW
    Postgres --&amp;gt; PGVector

    Player --&amp;gt;|HTTP Range Stream| API
    API --&amp;gt;|Read Audio Bytes| AudioStore
    STT --&amp;gt;|Read Audio| AudioStore&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  1. Gemma 3: Local Reasoning &amp;amp; Memory Extraction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;code&gt;gemma3:1B-Q4_K_M&lt;/code&gt; (Gemma 3 1B 4-bit quantized).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime:&lt;/strong&gt; Gemma 3 1B Q4_K_M running locally through Docker Model Runner (&lt;code&gt;docker model run gemma3:1B-Q4_K_M&lt;/code&gt;) on port &lt;code&gt;12434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; Structured JSON memory extraction (&lt;code&gt;temperature: 0.1&lt;/code&gt;), grounded RAG answer generation (&lt;code&gt;temperature: 0.2&lt;/code&gt;), and "Then vs Now" historical comparison synthesis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. BGE-M3: 1024-Dimensional Local Vector Indexing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;code&gt;BAAI/bge-m3&lt;/code&gt; via local &lt;code&gt;SentenceTransformers&lt;/code&gt; (&lt;code&gt;EMBEDDING_LOCAL_ONLY=true&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimensions:&lt;/strong&gt; 1024-dimensional normalized dense vectors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composite Text Schema:&lt;/strong&gt; Encodes &lt;code&gt;TITLE + SUMMARY + TOPICS + TRANSCRIPT&lt;/code&gt; together so semantic queries like &lt;em&gt;"school days"&lt;/em&gt; or &lt;em&gt;"travelling by train"&lt;/em&gt; map directly to relevant memories.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Speech-to-Text (STT)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; &lt;code&gt;faster-whisper&lt;/code&gt; (&lt;code&gt;large-v3-turbo&lt;/code&gt; model default) with PyAV and CTranslate2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution:&lt;/strong&gt; Local transcription with Voice Activity Detection (&lt;code&gt;vad_filter=True&lt;/code&gt;) and precise segment timestamps (&lt;code&gt;start_time&lt;/code&gt;, &lt;code&gt;end_time&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. PostgreSQL + pgvector Hybrid Retrieval
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; PostgreSQL 16 image (&lt;code&gt;pgvector/pgvector:pg16&lt;/code&gt;) with &lt;code&gt;pgvector&lt;/code&gt; extension and HNSW vector index (&lt;code&gt;Vector(1024)&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Fusion:&lt;/strong&gt; Combines cosine vector similarity (&lt;code&gt;1.0 - cosine_distance&lt;/code&gt;) with multi-field lexical keyword matching re-ranked via Reciprocal Rank Fusion (RRF $k=60$) blended with linear score weighting (65% vector, 35% keyword).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Evidence-Grounded Refusal Guardrail
&lt;/h3&gt;

&lt;p&gt;If no retrieved memory candidate meets the confidence floor ($\ge 0.20$), the system refuses to guess and outputs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Grandfather has not spoken about this in his recorded memories."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Technology Stack Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Frontend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;React 18, Vite, Tailwind CSS, Lucide Icons&lt;/td&gt;
&lt;td&gt;Modern Web UI &amp;amp; docked audio player&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;FastAPI, Python 3.10+, PyAV, Pydantic&lt;/td&gt;
&lt;td&gt;REST API &amp;amp; media streaming server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;PostgreSQL 16&lt;/td&gt;
&lt;td&gt;Relational storage for memories, transcripts, &amp;amp; eras&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vector Index&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pgvector&lt;/code&gt; (0.2.5+)&lt;/td&gt;
&lt;td&gt;1024-dim HNSW vector similarity search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LLM Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gemma 3 1B Q4_K_M (&lt;code&gt;gemma3:1B-Q4_K_M&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Local memory extraction, grounded QA, Then vs Now&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LLM Runtime&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Docker Model Runner (&lt;code&gt;docker model&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Local LLM inference engine (port 12434)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Embeddings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;BAAI/bge-m3&lt;/code&gt; (SentenceTransformers)&lt;/td&gt;
&lt;td&gt;1024-dimensional normalized dense vectors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Speech-to-Text&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;faster-whisper&lt;/code&gt; (&lt;code&gt;large-v3-turbo&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Local transcription &amp;amp; timestamp extraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Containerization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Docker &amp;amp; Docker Compose&lt;/td&gt;
&lt;td&gt;Containerized database and vector engine setup&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open-weight models (&lt;strong&gt;Gemma 3&lt;/strong&gt;, &lt;strong&gt;BGE-M3&lt;/strong&gt;, &lt;strong&gt;faster-whisper&lt;/strong&gt;) and open-source infrastructure (&lt;strong&gt;PostgreSQL + pgvector&lt;/strong&gt;) are essential for personal family archives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy &amp;amp; Data Sovereignty:&lt;/strong&gt; Personal family history, private transcripts, and voice audio remain strictly on local hardware rather than being transmitted to third-party public LLM cloud providers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-Term Longevity:&lt;/strong&gt; Closed cloud APIs can change terms of service, adjust pricing, or sunset models. Open-weight models running on standard host hardware guarantee that the family time capsule will remain accessible 10 or 20 years from now.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full Transparency &amp;amp; Control:&lt;/strong&gt; Open infrastructure allows us to inspect and customize prompt templates, tune retrieval thresholds, and manage vector indices directly without relying on proprietary black-box pipelines.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build for a Friend:&lt;/strong&gt; Built specifically for my grandfather to preserve his living oral history and share his recorded memories with our family.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Uses &lt;strong&gt;Gemma 3 1B Q4_K_M running locally through Docker Model Runner&lt;/strong&gt; for structured memory extraction, evidence-grounded Q&amp;amp;A generation, and historical "Then vs Now" reflections.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
