See how to build this application in this post on speech to text in the browser with the Web Speech API.