demo · v142

Context phrases

Type some biased phrases and start the mic. The page runs two SpeechRecognition sessions in parallel — one with phrases set, one without. Watch the transcripts diverge on tricky proper nouns.

SpeechRecognition supported
—
phrases property supported
—

recogniser · NO context phrases

—

recogniser · WITH context phrases

—

relevant API

const sr = new SpeechRecognition();
sr.phrases = [
  new SpeechRecognitionPhrase("Llanfairpwllgwyngyll", 5.0),
  new SpeechRecognitionPhrase("Cwmbran", 4.0),
];
sr.start();

see also