1. The document discusses adding speech recognition and speech synthesis capabilities to web applications using the Web Speech API specifications.
2. It provides code examples for using the SpeechRecognition interface to translate spoken words to text and the SpeechSynthesis interface to output text as synthesized speech.
3. The document demonstrates how to build a simple speech-enabled question and answer application that allows the user to ask questions out loud and receives the answers as synthesized speech.
8. The process of speech
rec includes
1. Record and digitize the audio data
2. Split data into phonemes
3. Apply the phonemes to the recognition model
4. Analyze the results against the grammar
5. Return a confidence weighted result
17. Let's recognize some
speech
Click to Speak
hello world
var recognition = new SpeechRecognition();
recognition.onresult = function(event) {
if (event.results.length > 0) {
var test1 = document.getElementById("test1");
test1.innerHTML = event.results[0][0].transcript;
}
};
recognition.start();
23. Let's do something a little
less trivial
Click to Speak
recognition.onresult = function(event) {
var result = event.results[0][0].transcript;
var music = document.getElementById("music");
switch(result) {
case "jazz":
music.src="jazz.mp3";
music.play();
break;
case "rock":
music.src="rock.mp3";
music.play();
break;
case "stop":
default:
music.pause();
}
};