MycroftAI / mimic-recording-studio

Mimic Recording Studio is a Docker-based application you can install to record voice samples, which can then be trained into a TTS voice with Mimic2
Apache License 2.0
496 stars 114 forks source link

Failing to load promts over https #42

Open MrityunjoyS opened 3 years ago

MrityunjoyS commented 3 years ago

I'm trying to run mimic-recording-studio over https, hosting it in server. For that I've set up nginx. My nginx.conf file -->

server { listen 6060 ssl; server_name example.recoder.net; ssl_certificate //nginx-selfsigned.crt; ssl_certificate_key //nginx-selfsigned.key;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
# enable WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

location / {
    proxy_pass http://localhost:3000/;
    add_header 'Access-Control-Allow-Origin' '*';

} }

After setting this up, I'm no longer getting microphone permission error. But when I'm trying to start recording promts are not getting load, getting error -

error loading prompt... is the backend running?

And in UI I'm getting error :- Screenshot from 2021-04-08 23-33-39

Please suggest any workaround.

amoljagadambe commented 3 years ago

same with me. please do update with solutions if anyone has any.

gaisml commented 3 years ago

Found the solution, change the API root in index.js file. in code, @krisgesling add localhost which will be false in case if you are adding the code on the cloud you have to give the URL of cloud.

and if your using HTTPS then change the python URL to HTTPS also cause if you don't then the frontend will block your request on basis of mixed content.