Repository navigation
💡 Emotion-Synchronized Avatar: TTS Nonverbal Tags Driving Real-Time Rive Micro-Expressions #503
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the TTS engine emits inline nonverbal markers —
[laughter],[sigh],[emphasis]— map them in real-time to Rive avatar micro-expression animations. The avatar laughs when something is funny, looks concerned when discussing problems, and shows emphasis on key points. This creates unprecedented emotional synchronization between voice output and visual character animation.Market Signal
Cartesia Sonic 3.6 (August 2026, #1 on both Artificial Analysis speech leaderboards at 1,283 and 1,123 Elo) supports inline nonverbal tags in the TTS stream —
[laughter],[sigh], and other emotional markers are part of the audio generation pipeline. Character.ai proved massive demand for emotionally responsive AI personas (150M+ users). Rive's ViewModel data binding (production-ready 2026) enables real-time animation property updates from application state. No desktop AI agent combines TTS emotion markers with synchronized avatar animation — this is a genuinely novel capability.User Signal
TalkTerm's PRD establishes that "the relationship layer is the product." The three planned avatar animation states (listening, thinking, speaking) are the floor, not the ceiling. Non-technical users form trust and comfort through perceived emotional intelligence — research shows that congruent emotional expression between voice and visual cues significantly increases perceived warmth and trustworthiness. An avatar that responds emotionally to conversation content creates the "personal companion" experience that differentiates TalkTerm from every text-based competitor.
Technical Opportunity
The pipeline has three clear stages aligned with TalkTerm's architecture:
src/renderer/speech/extracts tags with byte-offset timestamps from the audio streamsrc/renderer/components/avatar/Rive's data binding decouples animation design from code — animators can change micro-expression behaviors without developer involvement, as long as the ViewModel contract is maintained. The
TextToSpeechport interface (src/shared/types/ports/) can expose aNonverbalMarkerEventstream alongside the audio stream.Assessment
Adversarial Review
Strongest objection: This requires Cartesia Sonic integration (Phase 2 dependency) and precise audio-visual synchronization. If the avatar laughs 200ms after the audio laugh, it feels uncanny and breaks trust rather than building it. Additionally, TTS-generated nonverbal tags may not always be contextually appropriate.
Rebuttal: Synchronization is solvable: Cartesia's streaming API provides byte-offset timestamps for nonverbal tags, and Rive's state machine transitions can be pre-queued to fire at the correct playback position — the same technique used for lip-sync in game engines. For contextual appropriateness, Claude's output can include lightweight emotion annotations (natural in conversational text) that guide the TTS provider's nonverbal generation. The key insight: this is an architecture decision — the
TextToSpeechport must include aNonverbalEventchannel even if Web Speech API ignores it initially. Designing the interface now costs nothing; retrofitting it later means rework.Suggested Next Step
Add a
NonverbalMarkerEventtype to theTextToSpeechport interface definition (timestamp: number,marker_type: 'laughter' | 'sigh' | 'emphasis' | 'pause' | 'excitement'). Add corresponding Rive ViewModel input properties to the avatar state machine spec. Web Speech API adapter returns no events; future Cartesia adapter maps inline tags to events. This ensures Phase 2 cloud TTS upgrade unlocks micro-expressions without Rive rework.All reactions