chat-with-gpt icon indicating copy to clipboard operation
chat-with-gpt copied to clipboard

Sorry, an error occured trying to record audio.

Open trialskid opened this issue 3 years ago • 2 comments

I am unable to record audio. Ive tried on my PC, mac and iphone

Running docker on an Unraid server

image

trialskid avatar Apr 23 '23 20:04 trialskid

Most likely because many browsers block audio recording on 'insecure' connections (no SSL, no lock icon in the URL bar) and the Docker command doesn't use SSL by default. You can try this in your config.yaml:

tls:
  selfSigned: true

to enable SSL, and access https://localhost:3000.

This is an undocumented feature because it's not well-tested yet and may not work.

cogentapps avatar Apr 26 '23 18:04 cogentapps

Just got this working. A little elaborated steps to enable selfSigned:

  1. You need a legit SSL certificate, the easiest way is to follow https://github.com/acmesh-official/acme.sh

  2. once you have the certificate key and cert files. Modify config.yaml as cogentapps said, but you also have to add the file paths

#### This session only exists if you are saving the keys on the server ####
services:
  openai:
    apiKey: sk-**************
  elevenlabs:
    apiKey: *************

#### Add this ####
tls:
  selfSigned: true
  key: /app/tls/yourwebsite.com.key.pem
  cert: /app/tls/certs/yourwebsite.com.cert.pem
  1. Obviously the /app/tls/ path doesn't exist yet. You need to mount it to the path where acme.sh installed the cert in step 2) e.g. sudo docker run -d -v /home/username/data:/app/data -v /path/to/cert:/app/tls -p 3000:3000 chat:latest

Vuthric avatar May 05 '23 22:05 Vuthric