Developing an AI Assistant with Realistic Facial Expressions and Gestures
Users complain that voice assistants feel soulless? Facial expressions and gestures are key to trust. But achieving this is tricky: it requires real-time synchronization of speech, emotions, and animation. In one retail project, we embedded an avatar with detailed facial expressions — conversion to the target action increased by 30% due to higher trust in recommendations. The difference between a virtual assistant with realistic facial expressions and without is the difference between a tool and an experience. Expressions create emotional resonance, reduce cognitive load on perception, and increase trust in information. We build the full stack: from dialogue to rendering, using proven open-source and commercial components.
What typical errors occur when synchronizing speech and gestures?
In practice, the most common issue is desync between audio and lip movements — the so-called "dubbing" effect. Even with perfect lip sync, hand gestures may look unnatural: they either repeat cyclically or don't match the emotional tone of speech. The solution is a combination of FACS-based expressions with data-driven gesture generation from motion capture. For example, FACS (Facial Action Coding System) describes expressions through combinations of Action Units (AU), allowing precise facial settings. For gestures, we use neural networks like Gesticulator and DiffuseStyleGesture, trained on thousands of hours of human video.
How to achieve realistic expressions without artifacts?
The system generates AU vectors in real time based on three sources:
- Sentiment analysis of the LLM response → emotion mapping (e.g., positive response → smile, surprise)
- Prosody analysis of TTS audio → speech accents (brow raise on pitch rise, lip corners on smile)
- Dialogue context: question → nod, uncertainty → frown
NVIDIA Audio2Face provides neural lip sync: audio → facial muscle animation (jaw, lips, cheeks) with latency <33 ms when run locally. Integration with MetaHuman via LiveLink allows quick adaptation of animation to an existing 3D model. Compared to open-source LSTM solutions, Audio2Face is 10x faster.
Gesticulator and DiffuseStyleGesture generate hand gestures synchronized with speech. Speech2Gesture is a data-driven approach based on motion capture corpora, yielding natural transitions between gestures.
Eye Behavior — a procedural system: saccades (rapid movements), smooth pursuit, blink rate (adapts to context — internal thinking → slower blink), vergence (focus on the speaker via webcam face tracking).
Why is sub-second latency important?
User studies show: delays up to 1200 ms are perceived as normal in conversational context. We achieve this through streaming TTS (ElevenLabs WebSocket API) for sub-second first audio, LLM streaming (GPT-4o or Llama 3 70B self-hosted + RAG), and local WebGL rendering without desync. The result is a total delay from user input to avatar movement start of 500–1000 ms.
Dialog System
LLM (GPT-4o or Llama 3 70B self-hosted) + RAG for domain knowledge. Emotion-aware system prompt: in addition to the response, the model generates a JSON with emotion tag {emotion: "curious", intensity: 0.7} → emotion controller → expressions. The avatar starts moving before the full response is generated.
Rendering
| Platform | Technology | FPS | Requirements |
|---|---|---|---|
| Web | Three.js + morph targets | 30 | Mid-range GPU |
| Desktop/Kiosk | Unreal Engine 5 Pixel Streaming | 60 | GPU server |
| Mobile | Unity + ARKit/ARCore | 25–30 | iPhone 12+ |
Development Pipeline
Step-by-step implementation plan:
- Define the avatar's emotional map (basic emotions and AU combinations).
- 3D modeling with FACS targets (46 AU blend shapes).
- Configure Audio2Face for the target TTS.
- Integrate LLM with emotion tagging in JSON.
- Client testing with p99 latency measurement.
Estimated timeline:
- Weeks 1–4: Avatar design and 3D modeling. FACS system setup.
- Weeks 5–9: Dialogue pipeline (STT → LLM → TTS with emotion tagging). Audio2Face integration.
- Weeks 10–14: Gesture system. Eye behavior. Integration of all components.
- Weeks 15–18: Latency optimization. Load testing. UX testing with users.
Target Latency Metrics
| Component | Target Latency |
|---|---|
| STT (Whisper large) | 200–400 ms |
| LLM (streaming first token) | 100–300 ms |
| TTS (first audio chunk) | 100–200 ms |
| Lip sync start | <33 ms from audio |
| Total perceived response | 500–1000 ms |
What's Included
- Avatar prototype with 46 AU, tailored to your brand persona.
- Integration with your LLM via a unified API.
- API and architecture documentation.
- Load testing with a report (p99 latency, FLOPS, GPU utilization).
- Team training (2 days, onsite or remote).
Contact us for a consultation on your project. Request a demo prototype in 2 weeks — see for yourself the quality of realistic animation on real data. We guarantee schedule adherence and full transparency at every development stage.







