Preserve the voice, words, and phrases that make communication feel personal before speech loss occurs.
Every year, millions of people lose the ability to speak — due to ALS, stroke, throat cancer, Parkinson's, or progressive neurological conditions. VoiceLegacy lets people preserve their natural voice and build a personal communication toolkit — so they can always sound like themselves when it matters most.
-
Voice Cloning — Read 8 short phrases into your microphone. ElevenLabs creates a private clone of your voice in seconds. From that point on, any text can be spoken back in your voice.
-
Phrase Bank — Build a personal library of the things you actually say, organized by category: Family, Daily Needs, Comfort, Humor, Emergency, Personal. Every phrase is playable in your cloned voice with one tap.
-
AI-Powered Communication — Gemini suggests phrases, rewrites messages to sound warmer or shorter, and restyles text to match your saved communication tone. You type what you want to say. The AI shapes it. Your preserved voice speaks it.
-
Privacy-First Design — Explicit consent before anything is recorded. All data is private, never shared, and deletable at any time.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Styling | Tailwind CSS v4 |
| Authentication | Clerk (@clerk/nextjs v7) |
| Database | MongoDB Atlas |
| Voice Cloning + TTS | ElevenLabs API |
| AI Reasoning | Gemini API (Flash 2.0) |
| Audio Recording | Browser MediaRecorder API |
| Deployment | Vercel |
- Node.js 20+
- npm 9+
- API keys for: Clerk, MongoDB Atlas, ElevenLabs, Gemini (optional)
# Clone the repo
git clone https://github.com/ntoptchi/VoiceLegacy.git
cd VoiceLegacy/frontend
# Install dependencies
npm install
# Copy the env template and fill in your keys
cp .env.local.example .env.local
# Start the dev server
npm run devOpen http://localhost:3000 in your browser.
Copy frontend/.env.local.example to frontend/.env.local and fill in the values:
| Variable | Required | Source |
|---|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Yes | dashboard.clerk.com |
CLERK_SECRET_KEY |
Yes | dashboard.clerk.com |
MONGODB_URI |
Yes | cloud.mongodb.com |
ELEVENLABS_API_KEY |
Yes | elevenlabs.io |
GEMINI_API_KEY |
Optional | aistudio.google.com |
If you don't have a key yet, set the matching MOCK_* flag to true:
MOCK_DB=true # In-memory store, no MongoDB needed
MOCK_VOICE_API=true # Stub ElevenLabs responses
MOCK_GEMINI_API=true # Stub Gemini responsesLanding Page (/) → No auth required
↓
Record Voice (/record) → No auth — record 8 phrases, create voice clone
↓
Preview (/preview) → No auth — hear your clone speak for the first time
↓
Sign Up (Clerk) → Create account after hearing the emotional hook
↓
Consent (/consent) → Privacy agreement + communication style
↓
Phrase Bank (/phrases) → Build your personal phrase library
↓
Speak For Me (/speak) → AI rewrites + TTS playback in your voice
↓
Dashboard (/dashboard) → Profile, export, delete data
VoiceLegacy/
├── frontend/
│ ├── app/ # Next.js pages and API routes
│ │ ├── api/ # Backend API routes
│ │ │ ├── user/ # User CRUD (Clerk auth)
│ │ │ ├── voice/ # Upload, claim, delete voice
│ │ │ ├── phrases/ # Phrase CRUD
│ │ │ ├── gemini/ # AI suggest + rewrite
│ │ │ └── speak/ # Text-to-speech
│ │ ├── record/ # Voice recording page
│ │ ├── preview/ # Clone preview page
│ │ ├── consent/ # Privacy consent page
│ │ ├── phrases/ # Phrase bank page
│ │ ├── speak/ # Speak For Me page
│ │ └── dashboard/ # User dashboard
│ ├── src/
│ │ ├── components/ # Shared UI components
│ │ └── lib/ # Backend helpers, DB, API clients
│ ├── public/ # Static assets
│ ├── scripts/ # Seed + index scripts
│ └── .env.local.example # Environment variable template
├── voicelegacy-plan.md # Full project plan
├── PROGRESS.md # Build progress tracker
├── PITCH.md # Pitch guide for judges
└── SCRIPT.md # Demo video script
# Start development server
npm run dev
# Build for production
npm run build
# Seed demo data (requires MONGODB_URI in .env.local)
npx tsx scripts/seed-demo.ts
# Create database indexes
npx tsx scripts/ensure-indexes.tsThe app deploys to Vercel:
- Import the GitHub repo on vercel.com
- Set Root Directory to
frontend - Import environment variables from
.env.local - In MongoDB Atlas, add
0.0.0.0/0to the IP Access List for serverless - In Clerk, add the Vercel domain to allowed origins
- Deploy
Built at Hackabull by:
- Nicholas Toptchi
- Jackson Bopp
- Amrit Selva Ganesh
- Connor Kouznetsov
This project was built for a hackathon. All rights reserved.