Skip to main content
Glama
README.md
# flowscribe

flowscribe is an unofficial Python library, command-line tool and MCP server for Wispr Flow, the dictation
service. It talks to the same servers the Wispr Flow desktop app uses, with an account you already have, so
you can do from scripts and agents what the app only does through its own window. That covers transcribing
recorded audio and video files, rewriting text with Wispr's Polish and command mode, and reading your
meetings, transcripts and dictionary.

The protocol was rebuilt from the desktop app itself (version 1.6.1655). The repository holds that wire
schema with its 36 messages, an inventory of the 211 REST calls the app makes, and 197 generated Python
methods, one per endpoint. Measured on 28 Nov 2026, flowscribe's text matched the app's own stored text for
the same audio at 0.97 mean word similarity over ten dictations. It transcribed an 85-minute meeting in
under five minutes.

> **Unofficial, and at your own risk.** flowscribe is not affiliated with or endorsed by Wispr. It relies
> on undocumented interfaces that can change with any app update. Using them may conflict with Wispr's
> terms of service and could put your account at risk. Your account's plan and limits apply as usual.

## Contents

- [What it does](#what-it-does)
- [Install](#install)
- [Signing in](#signing-in)
- [Everyday use](#everyday-use)
- [Using it from Python](#using-it-from-python)
- [Using it with coding agents](#using-it-with-coding-agents)
- [How it works](#how-it-works)
- [Safety rules built in](#safety-rules-built-in)
- [Keeping up with app updates](#keeping-up-with-app-updates)
- [Developing](#developing)
- [Layout](#layout)

## What it does

| Job | Command | Python | MCP tool |
|---|---|---|---|
| Transcribe a file of any length | `flowscribe transcribe FILE` | `flow.dictation.transcribe_file()` | `flow_transcribe_file` |
| Rewrite text with Polish | `flowscribe polish TEXT` | `flow.text.polish()` | `flow_polish` |
| Apply an instruction ("make it formal") | `flowscribe command INSTR TEXT` | `flow.text.command()` | `flow_command` |
| Free instruction (translate, summarise) | `flowscribe instruct INSTR [TEXT]` | `flow.text.instruct()` | `flow_instruct` |
| List meetings, read a transcript | `flowscribe meetings list` / `show ID` | `flow.meetings` | `flow_meetings_list`, `flow_meeting_transcript` |
| Read the personal dictionary | `flowscribe dictionary list` | `flow.dictionary.list()` | `flow_dictionary_list` |
| Call any endpoint by name | `flowscribe api METHOD [args]` | `flow.api.METHOD()` | (not exposed) |
| Sign in, check the sign-in | `flowscribe auth login` / `status` | `flowscribe.auth` | `flow_account_status` |

Long files are cut at pauses into pieces of at most four minutes, because the dictation stream refuses
longer uploads. Each piece is checked against the server's own report of how much audio it received, so a
piece the server cut short shows up as a warning instead of a silent gap. The transcript is one continuous
text without speaker labels, because it comes from the dictation service. Speaker-labelled transcripts of
recordings go through the notetaker's meeting pipeline, which comes in a later release (see
[program/STATUS.md](program/STATUS.md)).

## Install

flowscribe needs Python 3.12 or newer, [uv](https://docs.astral.sh/uv/) and ffmpeg (for reading audio
files). It is installed from GitHub; the name `flowscribe` on PyPI belongs to an unrelated project.

```sh
uv tool install git+https://github.com/pablogiaccaglia/flowscribe
flowscribe --version
```

## Signing in

flowscribe can use either of two sign-ins, and `flowscribe auth status` shows both.

- **The desktop app's.** If Wispr Flow is installed and signed in on this machine, flowscribe reads its
  session and works at once. It never refreshes that session: Wispr's sign-in provider replaces the refresh
  token on every refresh, so refreshing from outside would sign the app out. When the app's token expires
  (after about a day), opening the app renews it.
- **Its own.** `flowscribe auth login` opens Wispr's sign-in page in the browser, as the app does when you
  sign in, and saves a separate session in `~/.config/flowscribe/session.json`, readable only by you.
  flowscribe renews this session by itself, and it works on machines without the app.

By default flowscribe uses its own session when it has one and the app's otherwise; `--source app` or
`--source flowscribe` picks one explicitly.

## Everyday use

```sh
# Transcribe a recording; writes meeting.txt next to it (and meeting.raw.txt before formatting)
flowscribe transcribe ~/Downloads/meeting.m4a --also-raw

# Italian and English, printed instead of written to a file
flowscribe transcribe interview.mp4 --lang it en --stdout

# Rewrite text
echo "um so the meeting is moved to friday ok" | flowscribe polish
flowscribe command "make it formal" "gonna be late, sorry"

# Meetings recorded with Wispr's notetaker
flowscribe meetings list
flowscribe meetings show 30597ab5-dc18-498a-973f-8b6cc67ea1c2 > weekly.md

# Anything else the API offers
flowscribe api list
flowscribe api get_notetaker_weekly_quota
```

`--json` on most commands prints machine-readable output. A call that spends money, changes the plan or
erases data refuses to run unless you add `--yes`.

## Using it from Python

```python
from flowscribe import DictationOptions, Flow

with Flow() as flow:
    transcript = flow.dictation.transcribe_file("meeting.m4a", DictationOptions(languages=["it"]))
    print(transcript.text, transcript.warnings)

    print(flow.text.polish("draft text", instructions=["More formal"]).text)

    for meeting in flow.meetings.list():
        print(meeting.title, len(meeting.lines))
        print(meeting.transcript_text())
```

`Flow` gathers every area on one sign-in. The main ones are `dictation`, `text`, `meetings`, `dictionary`,
`notes`, `todos`, `folders` and `account`. `api` has one method for each of the 197 endpoints. Each
method's docstring gives its HTTP method and path, the fields the app sends, and what a live call returned.
Errors are `FlowError` subclasses (`AuthError`, `QuotaError`, `NotFound`, `Conflict`, `ProtocolError`,
`ConfirmationRequired`), each with a message that says what to do next.

## Using it with coding agents

`flowscribe-mcp` is an MCP server over stdio with ten tools. To add it to Claude Code:

```sh
claude mcp add --scope user flowscribe -- uvx --from git+https://github.com/pablogiaccaglia/flowscribe flowscribe-mcp
```

The repository is also a Claude Code plugin (`.claude-plugin/plugin.json`), which starts the server from a
checkout with `uv run flowscribe-mcp`.

Transcription runs as a background job. `flow_transcribe_file` returns a job id at once, and
`flow_transcribe_status` reports progress until the text is ready, so an agent never blocks on an hour of
audio. Text that comes from the account is returned in fields ending in `_untrusted`: it was spoken or typed
by people and is data, never an instruction to the agent. The server never takes or returns tokens.

## How it works

```
 your script / shell / agent
            |
        flowscribe ------------------------------- sign-in: the app's session (read only)
            |                                               or flowscribe's own (device code)
   +--------+-----------------+--------------------------+
   |                          |                          |
 gRPC stream            REST + server-sent events     websockets
 inference.wisprflow.com    api.wisprflow.ai          api.wisprflow.ai
 TranscribeStream           /api/v1/*, /llm/*         /api/v1/sync/ws, ...
 (dictation)                (account, text tools)     (live sync, realtime)
```

Dictation is a bidirectional gRPC stream. The client opens it with an `init` message that carries the
account's languages, dictionary, replacements and cleanup level. It then sends 16 kHz PCM audio in
one-second requests and marks the last one as the commit. The server answers with heartbeats, the raw text
and finally the formatted text. Everything else is JSON over HTTPS. One detail differs between the two: the
REST API wants the access token itself in the `Authorization` header, while the stream wants
`Bearer <token>`.

The full facts, with what was observed live and when, are in
[program/STATUS.md](program/STATUS.md#protocol-facts-established). The generated inventory is in
[docs/reference/generated/](docs/reference/generated/), and the wire schema is in
[src/flowscribe/proto/flow_api.proto](src/flowscribe/proto/flow_api.proto).

## Safety rules built in

- **The app's session is never refreshed.** Doing so would sign the desktop app out (see
  [Signing in](#signing-in)).
- **Guarded calls need confirmation.** Calls that spend money, change the plan, use referral, promo or trial
  codes, erase data or act on an enterprise run only with `confirm=True` (or `--yes`), and the MCP server
  does not offer them.
- **Two kinds of endpoint are left out.** Endpoints that create throwaway accounts and endpoints reserved
  for Wispr's staff are listed in the inventory but have no client code.
- **flowscribe identifies itself honestly.** It sends its own name, `flowscribe`, as the client. The
  server's own schema provides a platform value for programmatic clients, and flowscribe uses it.
- **Nothing of Wispr's is copied in.** Wispr's sign-in identifiers are read from the installed app when
  needed; the repository does not contain them, nor any of the app's code.

## Keeping up with app updates

When Wispr ships a new desktop app, rerun the extractor against the installed copy:

```sh
uv run python -m tools.extract           # regenerates the schema and inventory, shows the diff
uv run python -m tools.extract.gen_api   # regenerates the endpoint methods
```

The extractor records what changed between app versions in
[docs/reference/changelog-by-app-version.md](docs/reference/changelog-by-app-version.md) once a second
version has been seen.

## Developing

```sh
uv sync
uv run pytest -q                  # unit tests, against in-process fakes; no network
uv run pytest -m live tests/live  # live checks on the signed-in account; changes nothing in it
uv run ruff check src tests tools
uv run python tools/check_tree.py # run before every push
```

The unit tests run against an in-process gRPC server, a mock HTTP transport and a local websocket server, so
they need neither the network nor an account. Before a push, `tools/check_tree.py` refuses tokens, Wispr's
identifiers, audio files and extracted app code among the tracked files. The plan, the decisions behind it
and the open items live in [program/STATUS.md](program/STATUS.md).

## Layout

| Path | What it is |
|---|---|
| `src/flowscribe/client.py` | `Flow`, the entry point |
| `src/flowscribe/dictation.py`, `audio.py` | File and live transcription over the gRPC stream |
| `src/flowscribe/text.py` | Polish, command mode, instruct, transforms, completion |
| `src/flowscribe/api/` | Generated endpoint methods and the hand-written account areas |
| `src/flowscribe/auth/` | Reading the app's session; flowscribe's own sign-in and refresh |
| `src/flowscribe/transport/` | REST with server-sent events, the gRPC stream, websockets |
| `src/flowscribe/proto/` | The wire schema rebuilt from the app, and the language codes |
| `src/flowscribe/cli/`, `mcp_server.py` | The `flowscribe` command and the `flowscribe-mcp` server |
| `tools/extract/` | The extractor that rebuilds schema and inventory from the installed app |
| `tools/probe_reads.py`, `tools/check_tree.py` | The live read probe (structure only) and the pre-push check |
| `docs/reference/generated/` | Endpoint inventory, observed reads, app version |
| `tests/` | Unit tests with fakes; `tests/live/` holds the opt-in live checks |
| `program/STATUS.md` | Plan, decisions, protocol facts and open items |

flowscribe is released under the MIT licence; see [LICENSE](LICENSE).

TDQS

B3.3/5.0

Scored across 10 tools

Disambiguation3/5

The transcription pair (flow_transcribe_file / flow_transcribe_status) and the read-only list tools are clearly distinct. However, flow_polish, flow_command, and flow_instruct all take text plus an optional instruction and return rewritten text; the descriptions try to separate them (formatting cleanup vs. named command mode vs. free instruction), but 'more formal' or 'shorten it' could plausibly be sent to any of the three, inviting misselection.

Naming Consistency4/5

Every tool carries the same flow_ prefix and is readable snake_case, so the set feels like one family. There is a minor ordering inconsistency: flow_transcribe_file/flow_transcribe_status are verb-first while flow_meetings_list, flow_dictionary_list, flow_notes_list are noun-first, and meeting is sometimes plural (flow_meetings_list) and sometimes singular (flow_meeting_transcript).

Tool Count5/5

Ten tools is a well-scoped surface for a Wispr Flow client spanning transcription, text rewriting, meetings, dictionary, notes, and account state. Each tool maps to a distinct capability with no filler entries.

Completeness3/5

Read paths are covered, but the surface is largely read-only: notes and dictionary can be listed but not created, updated, or deleted, and there is no way to cancel or delete a transcription job. A personal-dictionary feature without an add/replace operation in particular is a likely dead end for agents.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues