mirror of
https://github.com/SillyTavern/Extension-VRM.git
synced 2026-12-03 18:20:34 +07:00
[PR #6] TTS lip sync: wait for playback to start; keep the expression while talking #6
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/Extension-VRM#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SillyTavern/Extension-VRM/pull/6
Author: @nelsonblaha
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:fix-tts-lip-sync📝 Commits (2)
94cde01TTS lip sync: wait for playback to start before checking for its end6fd9139TTS lip sync: keep the character's expression while talking, restore it after📊 Changes
1 file changed (+29 additions, -3 deletions)
View changed files
📝
vrm.js(+29 -3)📄 Description
SillyTavern's TTS extension calls
vrmLipSync()before it sets the audio element's source and plays it (public/scripts/extensions/tts/index.js, the same inreleaseandstaging). So the firstonAudioProcess()seesaudio.paused, ends the job, andendTalk()throws on every reply:The mouth still moved, but only because that exception skipped the
disconnect()calls, so the script processor kept running until playback began. Each reply also left anAudioContextopen.Commit 1: wait for the audio element's
playbefore treating "paused" as the end of the job, onlystop()a source that was started, and close the job'sAudioContextwhen it ends.Commit 2: while talking, every expression was capped at 0.25 and never restored (the
TODO: restaure expression weight ?), so a character who had just turned happy or sad stayed at a quarter of it after speaking. Emotion presets are now capped at 0.5 while talking and restored afterwards, unless a newer reply's lip sync has taken over.Tested with SillyTavern 1.19.0, OpenAI Compatible TTS (Kokoro, not streaming), the local classifier,
VRM1_Constraint_Twist_Sample.vrm, and headless Chrome sampling the expression values every 100 ms during playback:InvalidStateErroron every reply. The mouth moved anyway, and "happy" stayed at 0.25 after the reply.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.