Skip to main content
A voice dictation app is one streaming speech-to-text loop plus a handful of UX decisions. PyAI Hear streaming is the engine: your app captures the mic, sends PCM16 audio frames up one WebSocket, and receives fast, revisable partial results (measured 185-205 ms to first partial on real speech, in-region) plus stable final results when each phrase settles. The whole app is how you render those two result types at the user’s cursor. Wispr Flow is the better buy for end users who want a finished, polished consumer app with system-wide OS integration. Building on PyAI makes sense when dictation is a feature inside your product: CRM note entry, medical or legal scribing, field-report capture, accessibility tooling, or a dictation bar you ship to your own users.

What you’re building

The UX contract that makes dictation feel instant: show partials immediately as provisional text (greyed, never committed), then replace them with finals as they land. The user sees words forming while they speak, and the text field only ever keeps stable output.

The PyAI stack for this build

That is the whole stack. Everything else (the hotkey, the cursor insertion, the text field) is your app.

Build order

1

Get a key with hear:stream

An instant sandbox key works for building. Production keys are created in the console.
2

Open the streaming socket

Connect to wss://api.pyai.com/v1/audio/transcriptions/stream and pass the key as the pyai-key.<API_KEY> subprotocol (browsers cannot set headers on a WebSocket). The full wire protocol, including query params and close codes, is in the streaming STT guide.
3

Capture mic audio as PCM16 frames

Use an AudioWorklet in the browser (or the native mic API on desktop) and stream 16 kHz PCM16 chunks of about 20 ms each as binary frames.
4

Render partials greyed, commit finals

Each partial replaces the previous provisional text at the cursor; each final locks in. This one rule is most of what makes dictation feel professional instead of jittery.
5

Add the dictation polish

Push-to-talk vs. always-on, a {"type":"commit"} flush when the user pauses or releases the key, filler-word handling, and auto-punctuation preferences. These are app-level decisions; the guide above covers the commit semantics.

When to buy Wispr Flow instead

Buy it when the customer is an individual who wants a finished app that works everywhere on their machine, with per-app tone and years of polish, and does not want to build anything. Build on PyAI when dictation lives inside a product you ship, when you need the transcript stream in your own systems, or when you want usage-based pricing instead of per-user subscriptions.

FAQ

How fast is PyAI dictation latency?

On real speech, measured in-region, Hear streaming returns its first partial in 185-205 ms. Partials are revisable by design (they refine as the phrase settles); finals are the stable text your app commits.

What languages can a PyAI dictation app support?

English is the GA, benchmarked language today. Other language codes are accepted as hints, but accuracy for them is not published yet. See the language support reference for current status.

Can I run dictation inside my own desktop or mobile app?

Yes. The socket takes raw PCM16 frames from any capture source (browser AudioWorklet, native mic APIs, a telephony leg), so the same integration works in an Electron app, a mobile app, or a web app.

What does it cost to build this on PyAI?

Dictation meters as transcription minutes, billed per second by default with no seats or subscriptions. Current rates are on the pricing page.

Start building

The streaming STT guide has the complete wire protocol, browser capture code, and the partial/final rendering pattern, or scaffold a working live-captions demo in one command: