demo · v139
Offline Dictation Pad
Chrome 139 adds processLocally: true to the Web Speech API — audio never leaves your device. Dictate text, toggle offline mode, and watch recognition keep working without a network connection.
idle
0
words transcribed
—
last confidence
—
processing mode
the code
const SR = window.SpeechRecognition || window.webkitSpeechRecognition;
if (!SR) { showFallback(); }
const rec = new SR();
rec.continuous = true;
rec.interimResults = true;
rec.lang = 'en-US';
// processLocally is Chrome 139+
if ('processLocally' in rec) {
rec.processLocally = true;
// audio stays on device — works offline
}
rec.onresult = (event) => {
let interim = '', final = '';
for (let i = event.resultIndex; i < event.results.length; i++) {
const t = event.results[i][0].transcript;
if (event.results[i].isFinal) final += t;
else interim += t;
}
appendFinal(final);
showInterim(interim);
};
rec.onerror = (e) => console.error('speech error:', e.error);
rec.start();