v150 Β· speech Β· accuracy

Confidence Visualizer

Speak a phrase. The SpeechRecognitionResultList returns up to N alternative transcripts, each with a confidence score from 0 to 1. This visualizer shows every alternative as a bar chart so you can see how certain the model is about each word choice.

Microphone access required. Requires Chrome with Web Speech API support. On-device mode (Chrome 150+) keeps audio local.
5
Utterances: 0 Highest confidence seen: β€” Lowest best-alt: β€”
Recognition alternatives 0 utterances
Speak a phrase to see confidence scores for each alternative transcript.
// Request multiple alternative transcripts
const recognition = new SpeechRecognition();
recognition.maxAlternatives = 5;   // up to 5 alternatives per result
recognition.processLocally = true; // Chrome 150+: require on-device

recognition.onresult = (event) => {
  const result = event.results[0];
  for (let i = 0; i < result.length; i++) {
    const alt = result[i];
    console.log(
      `#${i + 1}: "${alt.transcript}" β€” confidence: ${(alt.confidence * 100).toFixed(1)}%`
    );
  }
};

// Example output:
// #1: "hello world"    β€” 97.2%   ← winner
// #2: "halo world"     β€” 42.1%
// #3: "hello word"     β€” 31.8%

see also