docker pull registry.cn-beijing.aliyuncs.com/gaofei_cangku/py310-gpu-fun-asr-nano-2512:20260106
docker run -it --gpus=all --net=host --name=asr --privileged=true -v $PWD/:/data registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.2.1 bash
conda activate asr
pip install -r requirements.txt
pip install -r requirements-ws-demo.txt
python realtime_ws_server_demo.py
前端访问:http://ip:9004即可
- 注意: Chrome 默认禁止非 HTTPS 网页使用麦克风。
- 解决: 需配置
chrome://flags/#unsafely-treat-insecure-origin-as-secure才能使用麦克风。
Streaming SenseVoice processes inference in chunks of SenseVoice.
- transcribe wav file
$ python main.py- transcribe from microphone
$ python realtime.py- transcribe from websocket
A basic WebSocket service built with Recorder and FastAPI; the frontend uses MP3 format to transmit audio information to reduce latency and increase stability.
pip install -r requirements-ws-demo.txt
python realtime_ws_server_demo.py
# check cli options
python realtime_ws_server_demo.py --help