demo · v150

Code Mode

The verbatim-output case the explainer calls out: coding by voice, forensic transcription, accessibility scenarios where auto-inferred punctuation is harmful. With unspokenPunctuation: false (the default) the engine returns raw text — explicit dictation of "open paren", "comma" surfaces as literal words you can map to your own grammar.

Origin trial / behind flag. Requires Chrome 150+ with on-device speech. If the recogniser fails to start the panels will explain why.
idle.

raw transcript — unspokenPunctuation: false


      

use voice-grammar dictation: "open paren", "comma", "new line".

code-mapped output (post-processed)


      

the same transcript with "open paren" → "(" etc. mapped client-side.

const rec = new SpeechRecognition();
rec.continuous = true;
rec.interimResults = true;
rec.lang = 'en-US';
rec.unspokenPunctuation = false;   // verbatim mode

const codeMap = {
  'open paren': '(', 'close paren': ')',
  'open bracket': '[', 'close bracket': ']',
  'comma': ',', 'semicolon': ';',
  'equals': '=', 'arrow': '=>', 'new line': '\\n',
};

why verbatim mode is the point

The explainer explicitly carves out two cases where auto-punctuation is wrong: voice coding (you need to dictate punctuation literally, then map it to your grammar) and raw acoustic logging (transcription where the absence of punctuation is itself the data). The new attribute defaults to false precisely so these workflows are not silently broken — and so existing transcription code keeps working without a one-line opt-out.

see also

implementation reference

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