DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to run a local OpenAI style transcription API with FunASR

Start funasr-server on loopback with SenseVoice on CPU and call it like the OpenAI audio transcriptions endpoint.

Short answer: Create an env with python3.11 -m venv .venv-funasr-http and . .venv-funasr-http/bin/activate; then install with python -m pip install torch torchaudio and python -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. All steps.

  • Content
  • Intermediate
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

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

  1. Create an env with python3.11 -m venv .venv-funasr-http and . .venv-funasr-http/bin/activate
  2. Install with python -m pip install torch torchaudio and python -m pip install funasr fastapi uvicorn python-multipart
  3. Start the server with funasr-server --host 127.0.0.1 --port 8000 --model sensevoice --device cpu
  4. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer