Go to file
Bifang 13278d3aea Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
realtime_websocket Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
scripts Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
tests Add FunASR streaming model download config 2026-09-23 11:09:09 +08:00
.env.example Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00
.env.funasr.example Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
.env.qwen_legacy.example Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00
.gitignore first commit 2026-09-22 14:35:42 +08:00
FUNASR_README.md Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
README.md Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
README_QWEN_LEGACY.md Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00
model_manifest.json Add FunASR streaming model download config 2026-09-23 11:09:09 +08:00
pyproject.toml Add FunASR streaming model download config 2026-09-23 11:09:09 +08:00
pyproject_qwen_legacy.toml Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00
requirements-auxiliary.txt Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00
requirements-funasr.txt Use FunASR native realtime WebSocket flow 2026-09-23 14:37:20 +08:00
requirements-qwen-legacy.txt Split FunASR frontend and backend services 2026-09-23 10:30:16 +08:00

README.md

FunASR realtime ASR demo

This branch runs FunASR's native online WebSocket flow with local streaming ASR and FSMN VAD models. CAM++ speaker embeddings are handled by the separate auxiliary service. The browser page, JavaScript, and CSS are copied byte-for-byte from the local tencent-demo/static directory.

Start

Install a torch/torchaudio build for the host, then install requirements-funasr.txt and requirements-auxiliary.txt. Copy .env.funasr.example to .env if no .env exists, then download the three required FunASR assets:

python scripts/download_models.py --funasr-runtime

Start the backend (CAM++, native FunASR WSS, and the browser protocol bridge) in one terminal:

python scripts\run_backend.py

Start the frontend in another terminal:

python scripts\run_frontend.py

Open the URL configured by FRONTEND_HOST and FRONTEND_PORT. The frontend keeps the Tencent demo's same-origin /ws and /api/stop calls and proxies them to BACKEND_INTERNAL_URL. The public backend bridge defaults to port 8082; the native FunASR WS socket defaults to loopback port 10095. Model paths and device settings are described in FUNASR_README.md.