moshi: 0.0.0.0:8998 web ui can‘t clink connect

Backend impacted

The PyTorch implementation

Operating system

Linux

Hardware

GPU

Description

when i run python -m moshi.server then WX20240920-162156@2x but i can click settings but i can’t click connect

Extra information

none

Environment

Fill in the following information on your system.

  • Operating system version:

If the backend impacted is PyTorch:

  • Python version: 3.11
  • PyTorch version: 2.2.0
  • CUDA version (run python -c 'import torch; print(torch.version.cuda)'): 12.1
  • GPU model and memory: 24

ubuntu

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Just to mention that there is now a --ssl argument for both the pytorch and mlx version so that serving is done over https rather than http. You have to pass to this argument a directory that contains the key and certificate files.

After a bit of research, it appears to be a https issue, audioWorklet is only available in a https context: see here经过一番研究,它似乎是一个https问题,audioWorklet只在https上下文中可用:请参阅此处

confirmed that’s the issue证实这就是问题所在

so what can i do to solve the problem ?

  1. gen your CERT_FILE and KEY_FILE use cmd: openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365

  2. update your iptables iptables -A INPUT -p tcp --dport 8998 -j ACCEPT service iptables restart

  3. update server.py and restart server

    CERT_FILE = f’{HOME}/.ssh/cert.pem’ KEY_FILE = f’{HOME}/.ssh/key.pem’

    import ssl ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) ssl_context.load_cert_chain(certfile=CERT_FILE, keyfile=KEY_FILE) web.run_app(app, port=args.port, ssl_context=ssl_context)

  4. use https://x.x.x.x:8998/

After a bit of research, it appears to be a https issue, audioWorklet is only available in a https context: see here