# Kira ✨ AI body double β€” a girly-pop focus companion with real-time voice conversation, lo-fi music, ADHD tools, and a customizable avatar. Your wife's very own focus bestie who's always there when her real body double isn't available. ## Features - **πŸŽ™οΈ Voice conversation** β€” Push-to-talk microphone β†’ STT (Whisper) β†’ LLM (DeepSeek) β†’ TTS (OpenAI Nova voice) - **πŸ’¬ Text chat fallback** β€” Type when you don't want to speak - **🎢 Lo-fi music** β€” Streaming from Lofi Girl YouTube channel - **πŸ… Timer** β€” Pomodoro, countdown, stopwatch modes - **πŸ“ Notes** β€” Quick task list / check-in notes - **🎨 10 background scenes** β€” Cozy room, coffee shop, garden, rainy window, starry night, sakura, ocean, autumn, winter cabin, sunset - **✨ Particle effects** β€” Rain, stars, cherry petals, snow per scene - **πŸ‘˜ Wardrobe** β€” 5 outfits + 5 accessories (bow, glasses, flower crown, earrings, scarf) - **🐱 Pet zone** β€” Two cats: Mochi (orange fluffy) and Luna (sleepy black) - **πŸ• Live clock** β€” Time + date - **🌸 Animated avatar** β€” Blinking, speaking mouth, waving, outfit colors (Live2D-ready) ## Quick Start ### 1. Get API keys | Service | What for | Where | |---------|----------|-------| | OpenAI | Whisper STT + TTS (Nova voice) | https://platform.openai.com/api-keys | | DeepSeek | LLM brain | https://platform.deepseek.com/api_keys | ### 2. Configure ```bash cd ~/Projects/ai-body-double cp .env.example .env # Edit .env with your API keys: # OPENAI_API_KEY=sk-... # DEEPSEEK_API_KEY=sk-... ``` ### 3. Run ```bash docker compose up -d ``` Open **http://kira.hobokenchicken.com:3000** (or wherever you deploy it). ### 4. Add a Caddy entry (homelab) ``` kira.hobokenchicken.com { reverse_proxy 172.20.0.X:3000 } ``` ## Architecture ``` Browser ──WebSocket──▢ Backend (FastAPI) β”‚ β”‚ β”œβ”€ Mic audio ──────────▢ β”œβ”€ Whisper API (STT) β”‚ β”œβ”€ DeepSeek (LLM) β”‚ ◀── TTS audio ──────── β”œβ”€ OpenAI TTS β”‚ β”‚ β”œβ”€ YouTube embed (lo-fi) β”‚ β”œβ”€ Timer / Notes / Cats β”‚ └─ Animated avatar β”‚ ``` ## Live2D Model Setup Kira currently uses a CSS/SVG animated placeholder avatar. To add a Live2D model: 1. Commission or obtain a `.model3.json` (Cubism 4.x format) model 2. Place the model directory in `frontend/public/live2d/models/` 3. Rename the model entry point to `kira.model3.json` 4. The WebGL renderer will auto-detect and switch Required model files: - `kira.model3.json` β€” model definition - `kira.moc3` β€” mesh/deformer data - `kira.cdi3.json` β€” display info (optional) - `textures/` β€” PNG texture files - `motions/` β€” animation files (optional) - `expressions/` β€” face expression files (optional) Recommended creators for custom Live2D models: search VGen, VTube Studio model artists, or Fiverr. ## Color Palette | Token | Hex | Usage | |-------|-----|-------| | Kira Pink | `#FFB6C1` | Primary accent | | Kira Lavender | `#D8B4FE` | Secondary accent | | Kira Mint | `#A7F3D0` | Success/status | | Background | `#FFF5F5` | Card/comfy bg | | Text Plum | `#4A1942` | Body text | | Text Violet | `#7C3AED` | Soft text | ## Project Structure ``` ai-body-double/ β”œβ”€β”€ docker-compose.yml β”œβ”€β”€ .env β”œβ”€β”€ backend/ # FastAPI + WebSocket β”‚ β”œβ”€β”€ main.py # WS handler (STTβ†’LLMβ†’TTS pipeline) β”‚ β”œβ”€β”€ services/ β”‚ β”‚ β”œβ”€β”€ stt.py # OpenAI Whisper β”‚ β”‚ β”œβ”€β”€ llm.py # DeepSeek β”‚ β”‚ └── tts.py # OpenAI TTS β”‚ └── config.py # Env config β”œβ”€β”€ frontend/ # React + Vite + TailwindCSS β”‚ β”œβ”€β”€ src/ β”‚ β”‚ β”œβ”€β”€ App.tsx # Main layout β”‚ β”‚ β”œβ”€β”€ components/ β”‚ β”‚ β”‚ β”œβ”€β”€ AnimatedAvatar.tsx # SVG animated character β”‚ β”‚ β”‚ β”œβ”€β”€ KiraAvatar.tsx # Live2D loader + fallback β”‚ β”‚ β”‚ β”œβ”€β”€ ChatBubble.tsx # Conversation display β”‚ β”‚ β”‚ β”œβ”€β”€ Timer.tsx # Pomodoro/stopwatch β”‚ β”‚ β”‚ β”œβ”€β”€ MusicPlayer.tsx # Lofi Girl embed β”‚ β”‚ β”‚ β”œβ”€β”€ PetZone.tsx # Two CSS cats β”‚ β”‚ β”‚ β”œβ”€β”€ Wardrobe.tsx # Outfit + accessories β”‚ β”‚ β”‚ └── Particles.tsx # Rain/stars/petals/snow β”‚ β”‚ └── hooks/ β”‚ β”‚ └── useConversation.ts # WS + audio management β”‚ └── public/live2d/ # Cubism SDK + model slot └── README.md ```