Published May 21, 2014
| Version v0.4.0
Software
Open
0.4.0
Authors/Creators
Description
Features
- Native support detection #14
To detect native speech synthesis support use:
window.nativeSpeechSynthesisSupport(); // true, false
We use polyfill only when speech synthesis is not available. To initialize speech synthesis use:
var fallbackSpeechSynthesis = window.getSpeechSynthesis();
var fallbackSpeechSynthesisUtterance = window.getSpeechSynthesisUtterance();
var u = new fallbackSpeechSynthesisUtterance('Hello World');
u.lang = 'en-US';
u.volume = 1.0;
u.rate = 1.0;
u.onend = function(event) { console.log('Finished in ' + event.elapsedTime + ' seconds.'); };
fallbackSpeechSynthesis.speak(u);
Files
speech-synthesis-v0.4.0.zip
Additional details
Related works
- Is supplement to
- https://github.com/janantala/speech-synthesis/tree/v0.4.0 (URL)