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

  1. Punctuation Transcription

    A live speech-to-text demo where you can toggle unspokenPunctuation on and off. Speak naturally and compare the raw transcript (no auto-punctuation) with the punctuated version the engine produces when the flag is set.

  2. 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.

  3. Voice Command Mode

    The opposing use case: unspokenPunctuation: false for 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.

  4. 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.

  5. 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.

  6. 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.

  7. Quality Control Panel

    Two simultaneous SpeechRecognition sessions — one with unspokenPunctuation: 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.

  8. 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

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗