chat-with-gpt
chat-with-gpt copied to clipboard
No Whisper STT on Docker version
For privacy reasons, I wanted to self-host this app via Docker.
Everything works fine, but there is no microphone button to start voice recognition.
I already updated to the newest version. Is the Docker version behind the one hosted on https://chatwithgpt.netlify.app/ ?
The action that builds and publishes the docker images is having issues today, will fix soon: https://github.com/cogentapps/chat-with-gpt/actions/runs/4474836411/jobs/7863877059
In the meantime you can try to build locally by cloning the repo and running: docker build -t chat-with-gpt .
Thank you for the quick reply and suggested workaround! Now, I see the microphone button but when pressing it I get this error "Sorry, an error occurred trying to record audio.". The website also doesn't ask for access to the microphone like the version hosted by you does. Manually granting the permission didn't help.
Do I need to configure something with Whisper on my Linux server, or do you have a different idea of what might be the cause of this problem?
The hosted site is running the same code, so my first guess is that your browser is blocking access to the microphone because your local server isn’t running HTTPS.
If you’re using Chrome, possible workaround here: https://stackoverflow.com/a/67694562
I tried this workaround, but it didn't work, unfortunately. I think I'll try to get HTTPS working and see if that helps.
Are there any error messages in the JavaScript console in Chrome developer tools? That would help track down the issue.
Yes, there are two errors. The first one appears when loading the page and the second when clicking the microphone button. This is the console output:
main.f004e82c.js:2 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu 69766 @ main.f004e82c.js:2 n @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 192.168.1.66/:1 Error handling response: TypeError: Cannot set properties of null (setting 'textContent') at chrome-extension://bkkkaebljlanbmkbkajelmjgcmgaiapd/content.js:188:52 main.f004e82c.js:2 No locale data for en-GB (anonymous) @ main.f004e82c.js:2 d @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 r @ main.f004e82c.js:2 u @ main.f004e82c.js:2 Promise.then (async) r @ main.f004e82c.js:2 s @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 Rx @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 (anonymous) @ main.f004e82c.js:2 main.f004e82c.js:2 speech recognition error Error: speech permission was not granted at main.f004e82c.js:2:781268 at d (main.f004e82c.js:2:609309) at Generator.<anonymous> (main.f004e82c.js:2:610652) at Generator.next (main.f004e82c.js:2:609672) at r (main.f004e82c.js:2:603503) at s (main.f004e82c.js:2:603706)
You do not need to set the HTTPS, you can do the following:
- Open Chrome and go to chrome://flags/#unsafely-treat-insecure-origin-as-secure
- Enter your site address for example http://192.168.1.1:3000 select enable
- Relaunch Chrome
- Test the site, it should allow you to use the microphone.