Chapter 3

Speech recognition

Source code:

Available in GitHub

Exercises:

Dealing with recognition events

In the apps presented in this chapter, we have coded a response only for some recognition events (onResults, onError and onReadyForSpeech). You can improve the examples by also considering the other events (onEndOfSpeech, onEvent, onPartialResults, and on RmsChanged).

Always listening

In the apps presented in this chapter the recognition starts when a button is pressed. However, you may be interested in keeping you device continously listening and start recognizing when the user starts talking. In order to do this, you can use the code that you can find in gastlib.

This technique may introduce many errors, as the user may be talking to somebody else and not to the device. A trick to solve this situation is to use a command. For example, our library is called SANDRA (Speech ANDroid Apps), so the app could wait until the users says “Sandra” to start recognizing.

Suggested reading:

Greg Milette and Adam Stroud. Professional Android™ Sensor Programming, Wrox, 2012. Chapter 16 of this book covers ASR.

Reto Meier, Professional Android™ 4 Application Development, Wrox, 2012. Pages 439 to 441 present a brief discussion of ASR.

There are several tutorials on the web that show how to build a speech recognition app. These include:

James Elsey: Android – How to implement voice recognition, a nice easy tutorial. http://www.jameselsey.co.uk/blogs/techblog/android-how-to-implement-voice-recognition-a-nice-easy-tutorial/

Rakesh Kumar: Tutorial on Android Voice recognition. http://code4reference.com/2012/07/tutorial-android-voice-recognition/

Sue Smith (Mobile Tuts): Android SDK: Build a Speak and Repeat App. http://mobile.tutsplus.com/tutorials/android/android-sdk-build-a-speak-and-repeat-app/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s