In HTML5 and later, you can add speech recognition to a text input, as simple as adding an attribute to your elements. We can enable speech input by using the x-webkit-speech attribute like this:
When speech input is enabled the element, you should see a small microphone icon displayed on the right of the input. Clicking on this icon will launch a small tooltip to show that your voice is now being recorded.