Ξ΅α½Ξ½ΞΏΞΉΞ± (Greek) β beautiful thinking, well mind
A next-generation mental wellness platform featuring real-time AI therapy sessions with a photorealistic 3D avatar, voice interaction, and emotion-aware responses.
β¨ Features β’ π Quick Start β’ ποΈ Architecture β’ π Documentation
EUNOIA reimagines mental health support through cutting-edge AI technology. Have meaningful conversations with Sarah, your AI therapistβa photorealistic 3D avatar that speaks, listens, and responds with empathy.
|
|
| Feature | Description |
|---|---|
| π 3D AI Therapist | Meet Sarah β a photorealistic avatar with real-time lip-sync using TalkingHead |
| ποΈ Voice Conversation | Natural back-and-forth dialogue via ElevenLabs WebSocket streaming |
| π§ Empathetic AI | CBT-inspired responses powered by Google Gemini with emotion detection |
| π¨ Reactive Interface | Audio-responsive gradient backgrounds that pulse with your voice |
| π Session History | Track your wellness journey with saved conversation logs |
| π Authentication | Secure login with NextAuth.js supporting multiple providers |
|
πΌοΈ Picture-in-Picture The avatar takes center stage with your video in a floating, draggable window |
π Split View Side-by-side view for a more balanced conversation experience |
|
|
# Clone the repository
git clone https://github.com/yourusername/EUNOIA.git
cd EUNOIA
# Install frontend dependencies
cd frontend && npm install
# Install Python dependencies
cd ../Backend/python-service
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# Install Node.js service dependencies
cd ../node-service && npm installCreate .env files in each service directory:
π frontend/.env.local
# Authentication
NEXTAUTH_SECRET=your-super-secret-key
NEXTAUTH_URL=http://localhost:3000
# ElevenLabs Configuration
NEXT_PUBLIC_ELEVENLABS_API_KEY=your_elevenlabs_api_key
NEXT_PUBLIC_ELEVENLABS_AGENT_ID=your_agent_id
# Google Configuration (optional, for TalkingHead TTS)
NEXT_PUBLIC_GOOGLE_API_KEY=your_google_tts_api_keyπ Backend/python-service/.env
GEMINI_API_KEY=your_gemini_api_key
ALLOWED_ORIGINS=http://localhost:3000π Backend/node-service/.env
ELEVENLABS_API_KEY=your_elevenlabs_api_key
ALLOWED_ORIGINS=http://localhost:3000The easiest way β use the all-in-one startup script:
# From project root
./start-all-services.shOr start services individually:
# Terminal 1: Frontend (Port 3000)
cd frontend && npm run dev
# Terminal 2: Python AI Service (Port 8000)
cd Backend/python-service && source venv/bin/activate && python main.py
# Terminal 3: Node Voice Service (Port 8001)
cd Backend/node-service && npm start
# Terminal 4: TalkingHead Avatar (Port 8080)
cd Backend/talkinghead && python3 -m http.server 8080Navigate to http://localhost:3000 and begin your wellness journey! π§
EUNOIA/
βββ π Frontend (Next.js 15) β Port 3000
β βββ Real-time voice UI
β βββ 3D avatar integration (iframe)
β βββ Animated gradient backgrounds
β βββ Session management
β
βββ π Python AI Service (FastAPI) β Port 8000
β βββ Gemini AI conversations
β βββ Emotion detection
β βββ CBT-inspired responses
β βββ Biometric processing
β
βββ π’ Node Voice Service (Express) β Port 8001
β βββ ElevenLabs voice synthesis
β βββ WebSocket connections
β βββ Real-time audio streaming
β
βββ π TalkingHead (Static) β Port 8080
βββ 3D avatar rendering (Three.js)
βββ Real-time lip-sync
βββ Facial animations
graph LR
A[π€ User] -->|Voice| B[π Frontend]
B -->|WebSocket| C[ποΈ ElevenLabs Agent]
C -->|Transcript| B
C -->|Text Response| B
B -->|Speak Command| D[π TalkingHead]
D -->|TTS + Lip-sync| A
B -.->|Context| E[π Python AI]
E -.->|Emotion Data| B
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 15, React 19, Tailwind CSS | UI framework with server components |
| Animation | Framer Motion, Three.js | Smooth transitions & 3D rendering |
| Voice AI | ElevenLabs Conversational AI | Real-time voice-to-voice conversation |
| AI Brain | Google Gemini | Empathetic, context-aware responses |
| Avatar | TalkingHead | Photorealistic 3D character with lip-sync |
| Auth | NextAuth.js | Secure authentication |
Frontend Structure
frontend/src/
βββ app/
β βββ page.tsx # Home/dashboard
β βββ call/ # AI therapy session
β βββ login/ # Authentication
β βββ profile/ # User profile
β βββ history/ # Session history
β βββ api/ # API routes
βββ components/
β βββ ui/ # Reusable UI components
β βββ prompt-kit/ # Chat input components
βββ hooks/
β βββ useElevenLabsAgent.ts # Voice AI hook
β βββ useWebAudioQueue.ts # Audio playback
βββ lib/
βββ config.ts # App configuration
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/chat |
POST | AI conversation with CBT therapy |
/analyze-emotion |
POST | Detect emotion from text/voice |
/process-biometrics |
POST | Adaptive recommendations |
/health |
GET | Service health check |
| Endpoint | Method | Description |
|---|---|---|
/voice/synthesize |
POST | Text-to-speech conversion |
/chat-with-voice |
POST | AI response + voice synthesis |
/health |
GET | Service health check |
The background dynamically responds to audio levels:
- Silent/Idle β Calming purple & violet tones
- Speaking β Vibrant mix of colors
- Loud β Warm red & orange hues
| Key | Action |
|---|---|
Space |
Start/stop session |
M |
Mute/unmute microphone |
V |
Toggle video |
C |
Toggle captions |
- Create an account at ElevenLabs
- Navigate to Conversational AI β Create Agent
- Configure your agent's personality and voice
- Copy the Agent ID to your
.env.local
- Get an API key from Google AI Studio
- Add to
Backend/python-service/.env
Contributions are welcome! Please read our contributing guidelines before submitting a PR.
# Fork the repo
# Create your feature branch
git checkout -b feature/amazing-feature
# Commit your changes
git commit -m 'Add some amazing feature'
# Push to the branch
git push origin feature/amazing-feature
# Open a Pull RequestThis project is licensed under the MIT License β see the LICENSE file for details.
Built with π by:
| Name | Role | |
|---|---|---|
| π¨βπ» | Aditya Punjani | Full Stack Developer |
| π¨βπ» | David Nintang | Full Stack Developer |
| π¨βπ» | Sidharth Jain | Full Stack Developer |
| π¨βπ» | Aiden Miah | Full Stack Developer |
- HackHarvard 2025 β For hosting an amazing hackathon
- TalkingHead by met4citizen β 3D avatar technology
- ElevenLabs β Voice AI technology
- Google Gemini β AI conversation engine
- Ready Player Me β 3D avatar creation
Made with π for mental wellness
Your mind matters. Take care of it.

