mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
| .. | ||
| client.py | ||
| README.md | ||
| requirements.txt | ||
| server.py | ||
Service with http-python
Server
- Install requirements
cd funasr/runtime/python/http
pip install -r requirements.txt
- Start server
python server.py --port 8000
More parameters:
python server.py \
--host [host ip] \
--port [server port] \
--asr_model [asr model_name] \
--punc_model [punc model_name] \
--ngpu [0 or 1] \
--ncpu [1 or 4] \
--certfile [path of certfile for ssl] \
--keyfile [path of keyfile for ssl] \
--temp_dir [upload file temp dir]
Client
# get test audio file
wget https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav
python client.py --host=127.0.0.1 --port=8000 --audio_path=asr_example_zh.wav
More parameters:
python server.py \
--host [sever ip] \
--port [sever port] \
--add_pun [add pun to result] \
--audio_path [use audio path]