Chapter 1: Getting Starteda In time honoured tradition, we must start somewhere - there''s no better place than to ourselves familiar with the APIs! We''ll kick of our journey into the world of using this technology, with a look at introducing the Speech Synthesis and Speech Recognition APIs, and some of the considerations around implementing them in the broser, with regards to both user experience and security. Chapter 2: Exploring the APIs in Detail Now that we''ve been introduced to the APIs, it''s time for us to get stuck in and create something! Setting up the APIs is very straightforward, although not all browsers support them just yet - its important to understand how this might affect using the API. In this chapter we''ll expand on the simple demo we created back in Chapter 1, and work through the various functions to understand how easy it is to add speech capabilities to your website or online application. Chapter 3: Combining the APIs: Building a ChatBot Setting up basic speech capabilities is only the start - this opens up a host of innovative ideas for us to explore, and that''s before we even personalize the functionality we offer to customers! Over the course of this chapter, we''re going to combine both APIs together to build a simple chatbot that will respond to some basic phrases and display the results on screen. Chapter 4: Leaving Review Feedback How often have you felt the need to leave feedback about a shopping experience? Hopefully you''ve done so at least once; I suspect though there may be a seed of doubt as to whether someone will pick up on it, and do something about it! Irrespective of what feedback you leave, chances are you have to type in your comments; what if you could do so using your voice? Yes, novel as it may seem, this is a perfect way to show off using the Speech APIs! In this chapter, we''ll set up a basic product page, and add in voice feedback capabilities, which will automatically transcribe our comments in to written text. Chapter 5: Building Alexa One of the co-founders of Microsoft, Bill Gates once said that he believed voice and speech output will become a standard part of the [web] interface - with the advent of Siri, Alexa and Google Assistant, he was not wrong! Over the course of this chapter, we''ll make use of thhe Speech APIs to create a simple Alexa-style voice assistant; we''ll learn how to make it modular, so that''s easy to add further skills to help expand it''s capabilities. Chapter 6: Project - Finding a Restaurant All of this work we''re doing is making me feel hungry - it''s time for some food! Rather than stay in, I want to go out: trouble is, where to? What style of food do I fancy? We could take a look online, but that is so old school - why not simply ask our computer to tell us which nearby restaurants serve the food we fancy? Yes, we can use the power of the Speech APIs and the Zomato restaurant search service to do the work for us. Over the course of this chapter we''ll explore how we can use the APIs with other services to create some innovative apps Chapter 7: Project - Finding and Playing Music A question, if I may - how many of you make use of services such as Deezer or Spotify? I''ll bet the answer is a fair few of you: digital downloads or streaming music is the way forward.
Gone are the days of CDs; you can even listen to MP3s in cars nowadays, so why the need to cart them around with you? For this next project, we''re going to make use of the Spotify API service, and tie this in with the Speech APIs, to make a simple web audio client that fetches and plays back music.at the sound of our voice (yes, the pun is intended!). We''ll see how easy it is to set up something that allows us to retrieve our chosen track or album, and automatically launch it without the need to use a keyboard. Chapter 8: Project - Automating the Purchase Process We''re almost at the end of the book, but we have one more project in store for us! I''m sure you''ve spent hours trying to find a particular product, then added it to a basket, and gone through a good handful of screens to complete checkout, right? It''s a real pain with more complex baskets - what if we could automate part of the process? With the power of the Speech APIs, we can use our voice to find and add products to a basket, then checkout using the Payment Request API - all without touching a single keyboard. Sound impossible? Over the course of the chapter I will show you that this may just be reality now - we''ll go through the various steps required to automate all or part of the process, so you can see how much time and effort we can save our customers. Appendix: API Reference This section will cover some of the key code terms available for use in the Web Speech APIs.