v151 · speech · accessibility · forms
Web Speech API: Unspoken Punctuation
Chrome 151 adds an unspokenPunctuation boolean attribute to SpeechRecognition. When set to true, the speech recognition engine automatically infers and inserts punctuation — periods, commas, question marks — from the user's natural pauses and prosody, without requiring them to explicitly say "period" or "comma".
at a glance
| Shipped in | Chrome 151 (Enabled by default) |
|---|---|
| Status | Enabled by default |
| Standards position (Firefox) | Positive |
| Standards position (Safari) | No signal |
| ChromeStatus | 4785284026859520 — Web Speech API: Unspoken Punctuation |
why it exists
The existing Web Speech API returns transcript text but does not insert punctuation unless the user explicitly dictates it (e.g. says "Hello comma how are you period"). This produces run-on transcripts that require manual editing before use in prose contexts.
Many speech recognition systems — including mobile dictation on iOS, Android, and Windows — already infer punctuation from prosodic cues: a rising intonation ends with a question mark, a brief pause between clauses inserts a comma, a falling intonation followed by a longer pause inserts a period. The unspokenPunctuation attribute exposes this capability through the Web Speech API, enabling web apps to receive naturally punctuated transcripts without instructing users to speak punctuation aloud.
shape of the API
| Property | Type | Default | Description |
|---|---|---|---|
SpeechRecognition.unspokenPunctuation | boolean | false | When true, the recogniser inserts inferred punctuation into transcripts automatically |
The property must be set before calling start(). Setting it during recognition has no effect until the next session.
example
const recognition = new SpeechRecognition();
recognition.lang = 'en-US';
recognition.continuous = true;
recognition.interimResults = true;
// Chrome 151+: automatically add punctuation from prosody
recognition.unspokenPunctuation = true;
recognition.onresult = (event) => {
let transcript = '';
for (let i = event.resultIndex; i < event.results.length; i++) {
const result = event.results[i];
transcript += result[0].transcript;
if (result.isFinal) {
// Without unspokenPunctuation: "hello how are you doing today"
// With unspokenPunctuation: "Hello, how are you doing today?"
document.querySelector('#output').textContent += transcript;
}
}
};
recognition.start();
Source: chromestatus feature summary
browser support
| Browser | Support | Notes |
|---|---|---|
| Chrome 151+ | Enabled by default | All platforms |
| Firefox | Positive | Not yet shipped |
| Safari | No signal | — |