[PoC] Nuxt 3 + VTutor + Groq + TTS Integration
VTutor is an interactive web-based talking avatar that responds to chat messages with synthesized speech and real-time facial animation. It uses Vue 3 for the chat interface and HTML5 Canvas with the Web Audio API to animate the avatar’s mouth and eyebrows based on voice volume and emotion.
- Japanese and English TTS support
- Responsive design
- Audio playback
- VTutor integration
- Groq API integration
- TTS fallback
├── public/
│ ├── avatar-base.png # Avatar face image
│ ├── mouth-open.png # Open mouth overlay
│ ├── background.jpg # Chat background
│ └── vtutor.html # Animated avatar (iframe target)
│
├── components/
│ └── ChatBox.vue # Chat interface + iframe integration
│
├── pages/
│ └── api/chat.ts # Returns audioUrl for spoken message
│
├── README.md
npm install
npm run dev
- Mouth opens based on volume level
- Eyebrows change shape to reflect emotion (angry/happy/neutral)
{
"replyText": "こんにちは!お元気ですか?",
"audioUrl": "https://unreal-expire-in-90-days.s3-us-west-2.amazonaws.com/
0bd43948-ec5c-44d9-9521-cf40c2a7ce6c-0.mp3",
"ttsProvider": "UnrealSpeech"
}
if (volume > 15) emotion = 'angry'
else if (volume > 7) emotion = 'happy'
else emotion = 'neutral'
currentMouthScale += (targetScale - currentMouthScale) * 0.4
Make this value lower (e.g., 0.3) for slower/smoother animation.
Replace these files in public/:
- avatar-base.png
- mouth-open.png
With your own illustrations.
MIT License © 2025 Brian Ryder