Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Better feature detection for SpeechRecognition #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions webspeechdemo/webspeechdemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,12 @@ <h1 class="center" id="headline">
var recognizing = false;
var ignore_onend;
var start_timestamp;
if (!('webkitSpeechRecognition' in window)) {
var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
if (!SpeechRecognition) {
upgrade();
} else {
start_button.style.display = 'inline-block';
var recognition = new webkitSpeechRecognition();
var recognition = new SpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;

Expand Down Expand Up @@ -388,4 +389,4 @@ <h1 class="center" id="headline">
copy_info.style.display = 'none';
email_info.style.display = 'none';
}
</script>
</script>