Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Voice Application Development for Android

You're reading from  Voice Application Development for Android

Product type Book
Published in Nov 2013
Publisher Packt
ISBN-13 9781783285297
Pages 134 pages
Edition 1st Edition
Languages

Table of Contents (19) Chapters

Voice Application Development for Android
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Speech on Android Devices 2. Text-to-Speech Synthesis 3. Speech Recognition 4. Simple Voice Interactions 5. Form-filling Dialogs 6. Grammars for Dialog 7. Multilingual and Multimodal Dialogs 8. Dialogs with Virtual Personal Assistants 9. Taking it Further Afterword
Index

Developing applications with Google TTS


In order to avoid repeating the code in several places, and to be able to focus on the new parts as we progress to more complex applications, we have encapsulated the most frequently used TTS functionalities into a library named TTSLib (see sandra.libs.tts in the source code), which is employed in the different applications.

The TTS.java class has been created following the Singleton design pattern. This means that there can only be a single instance of this class, and thus an app that employs the library uses a single TTS object with which all messages are synthesized. This has multiple advantages, such as optimizing resources and preventing developers from unwittingly creating multiple TextToSpeech instances within the same application.

TTSWithLib app – Reading user input

The next figure shows the opening screen of this app, in which the user types a text, chooses a language, and then presses a button to make the device start or stop reading the text...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}