v151 · Web API · Speech
Web Speech API: Unspoken Punctuation
Chrome 151 adds the unspokenPunctuation property to the Web Speech API's SpeechRecognition interface. When enabled, the speech engine automatically infers and inserts punctuation — commas, periods, question marks — based on natural pauses and sentence structure, without requiring the user to say "period" or "comma" aloud.
concepts
-
Punctuation Transcription
A live speech-to-text demo where you can toggle
unspokenPunctuationon and off. Speak naturally and compare the raw transcript (no auto-punctuation) with the punctuated version the engine produces when the flag is set. -
Dictation Demo
A realistic note-dictation interface using
unspokenPunctuation: true. Speak in full sentences and receive a well-formed, punctuated document — no verbal punctuation commands required. -
Voice Command Mode
The opposing use case:
unspokenPunctuation: falsefor voice command interfaces. Auto-inserted punctuation corrupts exact-match keywords — "play music." ≠ "play music". Toggle between modes and watch the command matcher succeed or fail. -
Punctuation Diff Viewer
Two recognisers, one microphone. The left runs with
unspokenPunctuation: true; the right with it off. Speak naturally and see live word counts plus an "inferred punctuation" tally that shows exactly how many tokens the engine added on the left. -
Accessibility Impact
Three scenarios — long-form email, clinical note, voice command — showing how auto-punctuation changes both the visible transcript and the read-back through
speechSynthesis. Demonstrates the disability- and workflow-level reasons the property exists. -
Local-first workflow
A privacy-sensitive dictation surface that formats clinical notes, support tickets, task lists, and email drafts locally. Includes feature detection, unspoken punctuation toggles, and copy-ready production code.
-
Quality Control Panel
Two simultaneous
SpeechRecognitionsessions — one withunspokenPunctuation: true, one without — both fed from the same microphone. A diff panel counts auto-inserted punctuation marks, compares word counts, and shows character-level differences. Language selector for en/fr/de/ja. -
Safety Harness
12 structural tests — no microphone required: API detection, property presence and reflection, default value, continuous mode, language codes, abort/stop methods, result event shape, Permissions API query, secure context check, maxAlternatives, and graceful fallback. All tests report pass/warn/fail with expandable details.
why it shipped
The Web Speech API's SpeechRecognition exposes speech-to-text transcripts, but the engine's handling of punctuation has always been opaque. On-device and cloud-backed recognizers often insert automatic punctuation anyway — commas after pauses, periods at sentence ends — but there was no web-facing attribute to request or suppress this behaviour. Chrome 151 exposes unspokenPunctuation so developers can explicitly opt in on dictation surfaces (where it is helpful) and opt out on voice-command interfaces (where automatic punctuation would corrupt commands).
what the property controls
recognition.unspokenPunctuation = true— the engine infers and inserts punctuation in interim and final transcripts based on natural language cues (pauses, rising intonation, grammatical structure)recognition.unspokenPunctuation = false— the raw transcript contains only spoken words; the user must dictate punctuation commands explicitly ("period", "comma") if they want them- Applies to both
interimResultsand final results in theresultevent - Has no effect on browsers or devices whose on-device speech engine does not support auto-punctuation — it is advisory, not guaranteed
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗