html5-apps

SpeechSynthesisUtterance not working in an HTML5 app built for Android

梦想与她 提交于 2020-01-16 01:08:22
问题 So i am trying to build an HTML5 app with the Intel xdk.Now when i build the code below as a HTML5 app for Android and deploy it to my Android device, i cannot hear the sound when the function below is executed. function speak(){ var foo = new SpeechSynthesisUtterance("Speech"); foo.voice = voices.filter(function(voice) { return voice.name == 'Agnes'; })[0]; foo.volume = 0.5; // 0 to 1 foo.rate = 0.7; // 0.1 to 10 foo.pitch = 0.8; //0 to 2 //foo.lang = 'en-GB'; window.speechSynthesis.speak