LeRoy Hodge
LeRoy Hodge2mo ago

How to "force/turn on" audio output automatically - when an agent first starts (on page load)?

I am struggling to get my Voice Agent to work correctly. The problem I am having is that the agent starts with the sound off (X). I am trying to force the sound on at start (first page load). I can get the Agent to load and start automatically (on page load). However, there is no sound output from the agent … just text. I must manually turn sound on and reset the chat. Can someone take quick look at my code (attached) and let me know what I am doing wrong? THX
2 Replies
Tico | Voiceflow Assistant
Hi! At the moment the Web Chat widget purposely loads with the speaker muted because most browsers block any audio that starts before the user has interacted with the page (Chrome, Safari, Edge, etc. all follow this autoplay-policy). Because of that policy the widget only begins streaming TTS after the visitor clicks the speaker icon (or otherwise interacts with the page). For the same reason there isn’t an API flag you can pass to window.voiceflow.chat.load() to enable audio automatically on first load – the user gesture is required. Typical work-arounds: • Show a short welcome message (or modal) that asks the visitor to “Click the speaker to hear me talk,” then continue the conversation once they un-mute. • Build a fully custom interface using the Dialog Manager API so you control when audio is requested – but even there you’ll still need a user click before you can start playback. So, in short: it’s not something you’re doing wrong – the widget is following browser rules and currently can’t be forced to start un-muted programmatically. Hope that clarifies things!
LeRoy Hodge
LeRoy HodgeOP2mo ago
Ok. understood. can you help me or point me to a sample workflow or documentation and/or code snippet that can help me implement the first option. i.e., Show a short welcome message (or modal) that asks the visitor to “Click the speaker to hear me talk,” then continue the conversation once they un-mute.

Did you find this page helpful?