Skip to content
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

Failing to update instruction and role during active session #65

Open
emorling opened this issue Nov 10, 2024 · 1 comment
Open

Failing to update instruction and role during active session #65

emorling opened this issue Nov 10, 2024 · 1 comment

Comments

@emorling
Copy link

From the documentation it seems like we should be able to update the instructions and the voice during active session?

I am able to run updateSession without any errors.

I can even see the instructions and the voice has changed in this object:
console.log('🎯 Final client state:', clientRef.current.sessionConfig);

However, the current client does not use the updated prompt or voice. Do we need to disconnect, and reconnect for changes to take place?

@emorling
Copy link
Author

By enabling the debug flag when instantiating the RealtimeClient, I was able to see error that I cant switch voice when audio for assistant is active. So I am able to get this working by disconnect() and reconnect(). Is this the only way? I thought updateSession implied we could make changes in flight?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant