
#GOOGLE READER HTML5 HOW TO#
You can use the following code to get a list of all of the supported voices and use the Deranged voice when uttering the sentence “Jon likes Iced Tea.”: speechSynthesis.If you know a little about HTML, you will know that HTML tags are (mostly) used to format content - these tags tell the browser how to display the content on the page.
#GOOGLE READER HTML5 WINDOWS 8#
On the other hand, Google Chrome on Windows 8 only supports 11 voices and only one of these voices is intended for United States English.
#GOOGLE READER HTML5 MAC OSX#
The available voices depend on your browser and operating system.įor example, Google Chrome on Mac OSX supports 74 different voices including voices with names such as Alice, Google UK English Female, Deranged, Junior, Bubbles, and Princess. You can use different voices when using speech synthesis. That way, you can execute additional code after the computer finishes speaking.įinally, the speak() function calls the speechSynthesis.speak() method to actually voice the utterance. The speak() function accepts a callback that is called in the onend handler. The onerror event handler is invoked if anything goes wrong. The onend event handler is invoked after the utterance is spoken. In the code above, two event handlers are used.

You can specify a number of characteristics of the utterance such as the pitch, rate, volume, and voice. The speak() function creates an instance of the SpeechSynthesisUtterance object which represents the text that you want to read out loud. You can use the following code to read the message “Jon likes Iced Tea!” out loud: speak('Jon likes Iced Tea!') You answer the math questions by voice using speech recognition.īefore I show you how to create the math game, however, I want to go over the fundamentals of the speech api. The math questions (What is 8 + 2?) are spoken aloud. In this blog post, I explain how you can create a Math Quiz game.

However, the potential for the standard is so great that I couldn’t help trying out the standard when writing a simple game. So the Web Speech API is not yet stable enough for production apps. If you are not using SSL then you are asked repeatedly to give permission for an app to use Speech Recognition. Frustrating, but keep in mind that this is a very new technology.įurthermore, right now, Speech Recognition is not very usable when you are not using SSL. Sometimes, Speech API events are never raised and your app comes to a stop. If you want to use Microsoft IE or Mozilla Firefox then you are out of luck.Īlso, I need to warn you that the implementation of the specification on both Google Chrome and Apple Safari is still buggy. The only browsers that support the speech recognition standard are Google Chrome and Apple Safari. You can find the spec right here:Ĭurrently, browser support for the specification is spotty and buggy (I hope this changes – I write this on Jan 5, 2015). HTML5 includes the Web Speech API Specification, which covers both Speech Recognition and Text to Speech. If the child cannot type or read then the most natural way for the child to interact with the game is through speech. Imagine, for example, that you are creating a children’s game.

Wouldn’t it be great if you could interact with websites just like Siri on your iPhone? In other words, you could ask web pages questions out loud and get answers spoken back to you?
