Local LLM + Live2D + (optional) TTS pipeline that drives a virtual avatar from chat.
- Local LLM (Ollama) generates an
AvatarDirectiveJSON payload. - Live2D (Pixi) driver applies expressions, motions, gaze, and micro-timeline params.
- Optional Python TTS stub for audio + lip sync.
- Optional WPF host for a transparent desktop overlay.
- Node.js 18+
- Ollama (local LLM)
- Live2D Cubism core runtime file (required for Cubism 4 models)
- Python 3.10+ (optional TTS stub)
- .NET 6 SDK (optional WPF host)
server/Node.js backend + static hostingserver/front/React + Vite front-endpyserver/Python TTS stubcsharp/WPF + WebView2 host
-
Start Ollama.
ollama serve ollama pull gpt-oss:20b -
Prepare Live2D assets (see
Live2D Assetsbelow). -
(Optional) Start the TTS stub.
cd pyserver python -m venv .venv .venv\Scripts\activate pip install -r requirements.txt uvicorn pyserver:app --host 0.0.0.0 --port 8001
Or run it directly (same server):
cd pyserver python pyserver.py
-
Start backend + front-end.
cd server npm install copy .env.example .env npm run dev
-
Open
http://localhost:5173(Vite dev server). The Vite proxy forwards/api/*tohttp://localhost:3000.
Place your model and the Cubism core runtime under server/front/public/live2d/.
Example layout:
server/front/public/live2d/YourModel/
YourModel.model3.json
motions/
textures/
expressions/
server/front/public/live2d/live2dcubismcore.min.js
Notes:
- You must supply
live2dcubismcore.min.jsfrom the official Live2D SDK. Do not commit it. - If you already built the front-end, rebuild or copy the file into
server/front/dist/live2d/. - In the UI, use
/live2d/YourModel/YourModel.model3.jsonas the model path.
cd server
npm run build
npm startThen open http://localhost:3000.
These live in server/.env:
PORT=3000OLLAMA_BASE_URL=http://localhost:11434OLLAMA_MODEL=gpt-oss:20bPY_TTS_URL=http://localhost:8001(optional)
GET /api/health->{ ok: true }POST /api/chat->{ sessionId, directive }POST /api/tts->audio/wav
See csharp/README.md for transparent overlay notes and WebView2 requirements.