Detect Speak function

Bravo,! all is well now.my note3 can ‘playtone’ , cannot ‘speak’. Thanks for the code, it solves everything…
Below is my revised code.

  
JavaScript
  var voice;
  voice = "";

if ( typeof(speechSynthesis) != "undefined" && (speechSynthesis != null) ) {
 
  if (InStr(navigator.vendor, "Apple")) {
   voice = "Alex";}
  if (InStr(navigator.vendor, "Google")) {
   voice = "Google UK English Male";}
   
  Speak("Cheers! s Fighter",voice);
  }

End JavaScript