pipecat-ai / pipecat

Open Source framework for voice and multimodal conversational AI
BSD 2-Clause "Simplified" License
3.16k stars 280 forks source link

Storytelling Chatbot client crashes with client-side exception #285

Closed amacapri closed 2 months ago

amacapri commented 3 months ago

Storytelling Chatbot client sometime reports the following error on opening http://0.0.0.0:7860:

Application error: a client-side exception has occurred (see the browser console for more information).

Here is the browser console log:

TypeError: Cannot read properties of undefined (reading 'ondevicechange')
    at nx (d50e61c5-729bf43d5cce1859.js:19:31033)
    at Z.startListeningForDeviceChanges (d50e61c5-729bf43d5cce1859.js:19:42326)
    at new Z (d50e61c5-729bf43d5cce1859.js:19:49895)
    at Function.value (d50e61c5-729bf43d5cce1859.js:19:118289)
    at 647-07448eb149f02d56.js:1:32531
    at aI (fd9d1056-15205bcf7b0e6812.js:1:72882)
    at a3 (fd9d1056-15205bcf7b0e6812.js:1:84323)
    at a5 (fd9d1056-15205bcf7b0e6812.js:1:84961)
    at a8 (fd9d1056-15205bcf7b0e6812.js:1:84845)
    at a5 (fd9d1056-15205bcf7b0e6812.js:1:84941)

In the cases I don't get the above error, I get the following message:

This demo is currently at capacity. Please try again later.

To summarize, this demo doesn't work for me, or I don't know how to run it.

jptaylor commented 3 months ago

Hi. This error occurs when you run the demo on a host that is not localhost. This is because browsers will block access to mic and camera on anything other than localhost (this is by design.) I think we mention this in the README, but if not, I will update.

Try this: python bot_runner.py --host localhost

If that doesn't work, give it a try with ngrok.