gradio Audio页面录制不了声音,找不到麦克风;Error accessing the microphone: Cannot read properties of undefined
·
gradio服务器部署后,客户端浏览器点击麦克风录制不了;报错gradio Audio页面录制不了声音,找不到麦克风;这个报错信息可以邮件检查里看到Error accessing the microphone: Cannot read properties of undefined
大概是ssl错误,访问http形式的错误

1、服务器端ssl设置
参考:
https://github.com/gradio-app/gradio/issues/2551
1、
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes
2、demo.launch(server_name="0.0.0.0", server_port=7861, ssl_certfile="/path/to/cert.pem", ssl_keyfile="/path/to/key.pem", ssl_verify=False)
3、设置后浏览器用必须https访问,不然还是不行;https://1****:7861/

2、客服端浏览器设置
参考:
https://blog.csdn.net/weixin_44493841/article/details/108073810
在浏览器的地址栏里输入 chrome://flags/#unsafely-treat-insecure-origin-as-secure 并回车、然后作如下修改;设置完重启生效;这种浏览器设置就可以http访问,不需要设置ssl相关证书;不然还是不行;http://1****:7861/


更多推荐
所有评论(0)