security. The service is unauthenticated, so keep it on 127.0.0.1 as the README advises.
Who it is forA developer wiring speech to text into an app or agent without a cloud ASR bill.
The problemCloud transcription APIs cost money and send audio off your machine.
The outcomeA local /v1/audio/transcriptions endpoint returning verbose JSON.
What you need first
- Python >= 3.8 with PyTorch and torchaudio installed first, then `pip install funasr`
- A CPU is enough for SenseVoiceSmall; use device cuda only after confirming torch.cuda.is_available() prints True
- Python 3.11 plus fastapi, uvicorn and python-multipart for the local HTTP server
Steps
- Create an env with
python3.11 -m venv .venv-funasr-httpand. .venv-funasr-http/bin/activate - Install with
python -m pip install torch torchaudioandpython -m pip install funasr fastapi uvicorn python-multipart - Start the server with
funasr-server --host 127.0.0.1 --port 8000 --model sensevoice --device cpu - In a second terminal, POST a wav file to http://127.0.0.1:8000/v1/audio/transcriptions with model=sensevoice and response_format=verbose_json, as in the README curl example
Prompt for your agent
Using modelscope/FunASR, set up the Python 3.11 venv, start `funasr-server --host 127.0.0.1 --port 8000 --model sensevoice --device cpu`, and send <my wav file> to /v1/audio/transcriptions with curl.
Caveat. Wait for the model download and server startup before sending the first request.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for modelscope/FunASR and "Run a local OpenAI style transcription API"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer