MiniCPM-V icon indicating copy to clipboard operation
MiniCPM-V copied to clipboard

[web] <title>根据Readme启动demo后,demo无法在浏览器中调起麦克风和摄像头

Open cizhenshi opened this issue 1 year ago • 4 comments

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • [X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • [X] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

demo中点击语音视频按键后没有任何动作 不会调起麦克风

期望行为 | Expected Behavior

点击语音电话按键 应该调起浏览器麦克风权限

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?

NVIDIA h800机器

cizhenshi avatar Jan 15 '25 03:01 cizhenshi

image 如果web页面显示像上图一样,底部按钮不可点击, 表示没连接上model server,请先检查model server是否正常。 If the web page appears as shown in the image, with the button at the bottom greyed out and unclickable, it indicates that the model server is not connected. Check model server first.

iceflame89 avatar Jan 15 '25 07:01 iceflame89

Screenshot 2025-01-15 at 16 00 29

正常情况下,点击底部call通话按钮,会弹出mic和camera权限请求,点击允许即可。如果没有弹出,请确认使用Chrome浏览器。

Under normal circumstances, clicking the "Call" button at the bottom will trigger a request for microphone and camera permissions. Simply click "Allow" to proceed. Make sure you are using Chrome browser.

iceflame89 avatar Jan 15 '25 08:01 iceflame89

我现在遇到的情况是 可以点击底部按钮,但是不会跳出调用麦克请求权限的窗口

cizhenshi avatar Jan 15 '25 09:01 cizhenshi

Screenshot 2025-01-15 at 17 24 53

如果没有弹出权限请求,请点击左上角i按钮,并点击reset permission,然后刷新重试。

If the permission request does not appear, click the "i" button in the top left corner, select "Reset permissions," and then refresh the page to try again.

iceflame89 avatar Jan 15 '25 09:01 iceflame89

@cizhenshi 抱歉,我们发现使用ip地址访问会无法获取camera/mic权限,原因是没有https,浏览器会认为不安全而拒绝访问camera/mic。现已补充解决方案,请拉一下最新代码,执行make_ssl_cert.sh 创建自签名证书,如下:

cd web_demos/minicpm-o_2.6/web_server
# create ssl cert for https, https is required to request camera and microphone permissions.
bash ./make_ssl_cert.sh  # output key.pem and cert.pem

pnpm install  # install requirements
pnpm run dev  # start server

iceflame89 avatar Jan 16 '25 15:01 iceflame89

非常感谢!我后面会再尝试一下!感谢你们的工作!

cizhenshi avatar Jan 17 '25 01:01 cizhenshi