FamilyLegacy
Preserving Generations: How We Built FamilyLegacy to Keep Our Loved Ones' Voices Alive
Have you ever wished you could hear a late grandparent tell one of their classic stories just one more time? Or captured a parent's laugh and wisdom in a way that feels active, rather than frozen in a static video?
Time passes, and memories fade, but the voices that shaped us shouldnβt have to.
That is the moving force behind FamilyLegacy, an AI-driven digital preservation platform built during a recent hackathon (proudly sponsored by OpenAI and NVIDIA). FamilyLegacy allows families to securely clone the voices of their loved ones, transcribe and index their life stories, and create an interactive, emotionally aware digital legacy that can "talk back" with warmth, personality, and deep contextual memory.
Here is a look behind the scenes of why we built this, how the technology works, and how you can set it up for your own family.
π‘ The Vision: Moving From Static Media to Active Legacies
Traditional archivingβlike photo albums or old cassette tapesβis precious, but it is entirely passive. It requires us to lean back and listen.
FamilyLegacy turns archiving into an interactive experience.
Imagine asking a digital twin of your grandmother, "What was it like when you first moved to the city?" The system doesn't just read a random transcript; it searches through her recorded memories, synthesizes the facts with her specific personality traits (like "wise" or "cheerful"), and speaks the answer back to you in her exact cadence and tone.
π οΈ The Tech Stack: Engineering Empathy
Building an application that handles something as deeply personal as a family member's voice requires a seamless blend of accuracy, emotional nuance, and strict privacy. To achieve this, we combined state-of-the-art open-source AI models with robust database infrastructure.
The Pipeline Architecture
[Voice Sample] ββ> MongoDB (Profile Storage)
β²
[Story Audio] ββ> Whisper (Transcription) ββ> Qdrant (Vector Search)
β
[User Query] ββ> Context Retrieval ββ> Qwen2.5 (LLM) ββ> VoxCPM2 (TTS) ββ> [Heartwarming Response]
Here is how the pieces fit together:
- Transcription (OpenAI Whisper): When you upload raw audio recordings of family stories, Whisper accurately transcribes them into text, handling background noise and natural speech variations beautifully.
- Semantic Memory (Qdrant & Sentence-Transformers): The transcribed stories are converted into vector embeddings using
all-MiniLM-L6-v2and indexed into a Qdrant vector database. This allows the app to perform semantic searchesβunderstanding the meaning behind your questions rather than just matching keywords. - The Brain (Qwen2.5-3B-Instruct): Once Qdrant retrieves the relevant family memories, they are fed into Qwen2.5. This lightweight yet highly capable LLM acts as the conversational engine, weaving the facts into a heartwarming response tailored to the speaker's relationship (e.g., grandfather, mother).
- The Voice (VoxCPM2): The generated text is passed to VoxCPM2, an advanced voice-cloning and text-to-speech framework. By utilizing a brief reference audio sample, it synthesizes the final response into a high-fidelity digital twin of the loved one's voice.
- Data Control (MongoDB, FastAPI, & Gradio): Metadata and voice profiles are managed via MongoDB, while a clean, intuitive user interface is provided by Gradio and backed by FastAPI.
π Privacy First
We recognize that family data is sacred. Biometric data like voice prints and deeply personal family histories must never be commercialized or scraped. FamilyLegacy is designed with a privacy-focused architecture. The entire stack is built to be self-hosted securely, ensuring that your familyβs precious memories remain entirely under your control.
π How to Get Started
Want to try building or deploying FamilyLegacy for your own family? The project is open-source under the MIT license.
Prerequisites
Make sure you have Python 3.10+, an active MongoDB instance, a Qdrant instance, and FFmpeg installed on your machine for audio processing.
1. Clone & Install
git clone <repository-url>
cd FAMILY-LEGACY
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
2. Configure Environment
Create a .env file in the root directory to store your secure connection strings:
MONGO_URL=your_mongodb_connection_string
MONGO_DB_NAME=family_legacy
QDRANT_URL=your_qdrant_url
QDRANT_API_KEY=your_qdrant_api_key
3. Launch the App
python app.py
Open your browser and navigate to http://localhost:7860 to access the Gradio interface. From there, you can begin uploading voice samples, recording stories, and interacting with the system.
π Looking Ahead
FamilyLegacy is more than just a technical showcase of voice cloning and RAG (Retrieval-Augmented Generation). It is a testament to how AI can be used not just for automation, but for genuine human connection. By capturing the nuances of how our loved ones speak, think, and share, we ensure that future generations can learn from their ancestors in a deeply personal way.
Check out our Hugging Face Space to see the repository, watch our Product Demo Video, and let us know your thoughts on how AI can help preserve human history!
