| | |
| | | # Html5 server for asr service
|
| | |
|
| | | ## Requirement
|
| | | ### python
|
| | | #### Install the modelscope and funasr
|
| | | ```shell
|
| | | 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
|
| | | ```shell
|
| | | pip install flask
|
| | | # pip install gevent (Optional)
|
| | |
| | | ```
|
| | | 例子如下,需要注意ip地址,如果从其他设备访问需求(例如手机端),需要将ip地址设为真实ip
|
| | | ```shell
|
| | | cd funasr/runtime/html5
|
| | | python h5Server.py --host 0.0.0.0 --port 1337
|
| | | # python h5Server.py --host 30.220.136.139 --port 1337
|
| | | ```
|
| | | ### 启动ASR服务
|
| | | [具体请看online asr](../python/websocket)
|
| | | [具体请看online asr](https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket)
|
| | |
|
| | | `Tips:` asr 服务需要与html5服务部署到同一个物理机器上
|
| | | #### wss方式
|
| | | ```shell
|
| | | cd ../python/websocket
|
| | | python ws_server_online.py --port 1095
|
| | | python funasr_wss_server.py --port 10095
|
| | | ```
|
| | |
|
| | | ### 浏览器打开地址
|