-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(twilio): add configurable startup delay to avoid initial audio jitter (fixes #1906) #2033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for sending this pull request! I think we can have this change for now, but if you're fine to work on the following quickly,
this is definitely the best approach for us. Let me know if you're willing to take more time for this. Otherwise, we can merge this PR as an immediate workaround. |
|
Thanks for the feedback @seratch! 🙏 I’ve updated this PR to switch from a time-based delay to a deterministic startup warm-up:
Happy to tweak defaults, naming, or placement if you prefer this logic elsewhere. 👍 |
seratch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you resolve the lint error?
1952338 to
abab19c
Compare
|
Fixed the lint issues and rebased on the latest main all clean now ✅ |
|
Hi @seratch 👋 |
Fixes #1906
This PR reduces a short audio "jitter"/skip at the start of the Twilio realtime voice example by adding a small, configurable startup delay (env: TWILIO_STARTUP_DELAY_S, default 0.5s) before the realtime session, Twilio message loop and buffer flush tasks are started. This allows the websocket and audio buffers to settle and prevents missing the first audio frames.
Change summary:
Manual check:
Thanks!