ASR-demo/README.md

1.2 KiB

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.