Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #29 from bohnacker/master
Browse files Browse the repository at this point in the history
Fixed issue #27 by converting speechResult to lowercase
  • Loading branch information
chrisdavidmills committed Nov 15, 2018
2 parents 831ab0c + 97a41ed commit d15e5b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phrase-matcher/script.js
Expand Up @@ -56,7 +56,7 @@ function testSpeech() {
// These also have getters so they can be accessed like arrays.
// The second [0] returns the SpeechRecognitionAlternative at position 0.
// We then return the transcript property of the SpeechRecognitionAlternative object
var speechResult = event.results[0][0].transcript;
var speechResult = event.results[0][0].transcript.toLowerCase();
diagnosticPara.textContent = 'Speech received: ' + speechResult + '.';
if(speechResult === phrase) {
resultPara.textContent = 'I heard the correct phrase!';
Expand Down

0 comments on commit d15e5b4

Please sign in to comment.