whisper-flow
CLAUDE.md1k starsChanged 4 months agoMITView on GitHub
Guidance for Claude Code (and other AI assistants) working in this repository. See README.md for end-user/usage detail; this file is the agent-facing reference. Whisper Flow is a real-time, streaming speech-to-text service built on OpenAI Whisper and served via FastAPI. It splits incoming audio into temporal tumbling windows to emit partial transcripts at sub-500ms latency. Shipped as the Python package whisperflow (v1.4.0, Python 3.8+, developed/tested on 3.12). Everything runs through run.sh. The -local target rebuilds .venv from scratch; the other targets…
- Installs packages
Trending
Steady talk.thin dataabout the whole repository
Who's talking about dimastatz/whisper-flow
- @tom-doerr.bsky.social“https://github.com/dimastatz/whisper-flow/”Bluesky · Dec 31, 2025 · 1 likes
- konard/medical-speech-to-text“fix: serve the medical speech lab and expand dictation research”GitHub · Oct 31, 2026
- konard/medical-speech-to-text“We also need to make sure we add https://github.com/dimastatz/whisper-flow to our analysis”GitHub · Oct 30, 2026
- agonza1/rtc-asr“Expand realtime benchmark scorecard for partial latency metrics”GitHub · Aug 16, 2026
- agonza1/rtc-asr“Add stability-based finalization and explicit segment metadata”GitHub · Aug 16, 2026
The biggest 5 of 5 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 72
Add tests with every code change (the 95% coverage gate enforces this).
- Very specific: line 73
Always run ./run.sh -test and ensure it is green before finishing.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code (and other AI assistants) working in this repository. See README.md for end-user/usage detail; this file is the agent-facing reference.
Project overview
Whisper Flow is a real-time, streaming speech-to-text service built on OpenAI Whisper and
served via FastAPI. It splits incoming audio into temporal tumbling windows to emit partial
transcripts at sub-500ms latency. Shipped as the Python package whisperflow (v1.4.0,
Python 3.8+, developed/tested on 3.12).
Commands
Everything runs through run.sh. The -local target rebuilds .venv from scratch;
the other targets assume the venv is already activated (source .venv/bin/activate).
| Command | What it does |
./run.sh -local | Fresh .venv + install deps + format + lint + tests (first-time setup) |
./run.sh -test | black + pylint + pytest — the inner-loop check before committing |
./run.sh -run-server | uvicorn FastAPI server on port 8181 |
./run.sh -benchmark | Start server, run tests/benchmark (LibriSpeech WER/latency), stop |
./run.sh -docker | Build and run the container on port 8888 |
Running a single test (venv activated): pytest tests/test_streaming.py -v
Quality gates — must pass
CI enforces these via Dockerfile.test. ./run.sh -test runs the same checks
locally:
black whisperflow tests— formatting (no diffs allowed)pylint --fail-under=9.9 whisperflow tests— near-perfect lint score requiredpytest --ignore=tests/benchmark --cov-fail-under=95 --cov whisperflow— 95% coverage
Implication: every code change needs accompanying tests to keep coverage ≥95%, and all code
must be black-formatted and pass pylint at 9.9+. Run ./run.sh -test before considering work
done.
Architecture & key files
- whisperflow/transcriber.py — Whisper model loading and
inference:
get_model()(returns aModelPool),transcribe_pcm_chunks(),transcribe_pcm_chunks_async(). Never call one Whisper model from two threads at once: its decoder installs kv-cache hooks on the model, so concurrent calls corrupt each other. Borrow a replica withModelPool.acquire()(transcribe_pcm_chunksdoes this for you). - whisperflow/streaming.py — tumbling-window streaming logic,
TranscribeSession, and the committed-prefix scheme (Segment.commit) - whisperflow/fast_server.py — FastAPI app: WebSocket
/ws,GET /health,GET /ready,POST /transcribe_pcm_chunk - docs/protocol.md — wire contract; bump
PROTOCOL_VERSIONinwhisperflow/__init__.pyon any breaking change to it - whisperflow/chat_room.py — multi-user chat
- whisperflow/audio/microphone.py — audio input
- whisperflow/models/ — bundled
tiny.en.ptmodel - tests/ — pytest suite.
tests/benchmark/andtests/audio/are excluded from the coverage gate.
Environment gotchas
- Python 3.12 preferred —
run.shauto-selectspython3.12when available. setuptools<70pin is required foropenai-whispercompatibility (seerun.sh).- PortAudio system dependency is required for PyAudio:
brew install portaudio(macOS) /apt-get install portaudio19-dev(Debian/Ubuntu). - Audio format: 16 kHz, mono, 16-bit signed integer (int16) PCM.
- Ports: 8181 when run locally, 8888 in Docker.
Conventions
- Match the existing style; keep modules small and focused.
- Add tests with every code change (the 95% coverage gate enforces this).
- Always run
./run.sh -testand ensure it is green before finishing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

