zhaomingwork 6f3b508485 For python ws online asr slow problem (#582) před 2 roky
..
static 6f3b508485 For python ws online asr slow problem (#582) před 2 roky
demo.gif 2ec6637c8d add html5 demo for online ws srv před 2 roky
h5Server.py cfe1eb132a html5 docs před 2 roky
readme.md a16edb1ce1 websocket docs před 2 roky
readme_cn.md a16edb1ce1 websocket docs před 2 roky
ssl_key cfe1eb132a html5 docs před 2 roky

readme.md

Html5 server for asr service

Requirement

Install the modelscope and funasr

pip install -U modelscope funasr
# For the users in China, you could install with the command:
# pip install -U modelscope funasr -i https://mirror.sjtu.edu.cn/pypi/web/simple
git clone https://github.com/alibaba/FunASR.git && cd FunASR

Install the requirements for server

pip install flask
# pip install gevent (Optional)
# pip install pyOpenSSL (Optional)

javascript (Optional)

html5 recorder.js

Recorder 

demo

Steps

Html5 demo

usage: h5Server.py [-h] [--host HOST] [--port PORT] [--certfile CERTFILE] [--keyfile KEYFILE]

e.g.

cd funasr/runtime/html5
python h5Server.py --host 0.0.0.0 --port 1337 

asr service

detail for asr

Tips: asr service and html5 service should be deployed on the same device.

cd ../python/websocket
python wss_srv_asr.py --port 1095

open browser to access html5 demo

https://127.0.0.1:1337/static/index.html
# https://30.220.136.139:1337/static/index.html

modify asr address in html according to your environment

asr address in index.html must be wss

Acknowledge

  1. This project is maintained by FunASR community.
  2. We acknowledge AiHealthx for contributing the html5 demo.