Website Voice Search with the WebSpeech API and Adobe Search&Promote

Published on by Dan KlcoPicture of Me Dan Klco

With the takeover of the web by mobile browsers, tailoring experiences to mobile users is critical to creating successful experiences. Nearly 21.6% of mobile visitors use voice search on a daily basis, so providing voice search on mobile web experiences helps to create a more native experience for mobile users. Historically there has not been a good API for integrating voice recognition into websites, however, the (relatively) new WebSpeech API makes this possible right through JavaScript. This API is still experimental and only works in certain browsers, but has significant promise to more closely align web and native mobile experiences.   Using the WebSpeech API   Using the WebSpeech API is pretty simple. First, you'll want to check if your browser supports it by checking if the SpeechRecognition or webkitSpeechRecognition properties are available on the window object as such:   !('webkitSpeechRecognition' in window) && !('SpeechRecognition' in window)   Once you have confirmed that, you can construct a new...