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.
For current Hear pricing, see the pricing page.
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?protocol=pyai-hear-v1
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 about 200 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?
Hear dictation supports eight languages. Setlanguage to one of en, es,
fr, de, hi, it, pt, or nl; omission means English. It does not
enable language detection — the decoder is pinned for the session — and
unsupported values are rejected with 400 unsupported_language rather than
being treated as a soft hint. See the
language support reference.