daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private init(): void {
  2.     this._supportRecognition = true;
  3.     console.log(window['SpeechRecognition']);
  4.     if (window['SpeechRecognition']) {
  5.       this._speech = new SpeechRecognition();
  6.     } else if (window['webkitSpeechRecognition']) {
  7.       this._speech = new webkitSpeechRecognition();
  8.     } else if(window['msSpeechRecognition']){
  9.       this._speech = new msSpeechRecognition();
  10.     } else {
  11.       this._supportRecognition = false;
  12.     }
  13.     console.log(`Speech supported: ${this._supportRecognition}`);
  14.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top