How to detect and extract words from audio/video stream online in a webpage itself?
If you work on a regular basis with the "owner" of the voice I can recommend Nuance's Dragon it offers very accurate speech to text with very few errors but it needs some "calibration" to a specific voice.

So if you can get your actor/narrator to read the calibration text you will have an easy time making transcripts and subtitles (though subs will require manual timing afterwards).
Nuance also offers a developer SDK/API if you need that.

However it will not help you in the case of interviews with random people on the street.

An alternative that doesn't need calibration and is also free to use is the Google Voice to Text service. There is a nice un-offical "API" for that on Github.

It will give you usable results in most cases and its fairly easy to use if you know a bit about programming and can use a command line.
Though be aware that I do not know the legal status of that, I'm not sure if that service is allowed to be used for commercial use. You might want to read into the Google Terms of Service for that, they unified that about a year ago so it should apply for the Voice to Text service as well. Also a downside, it only accepts 15 seconds snippets but if you want to automate this anyway you can just split your audio file up with FFmpeg and upload them at the same time.

There is also another commercial alternative called iSpeech which works on a pay per use model.

Also there is a built-in speech recognition in Adobe Premiere which should be the easiest way to make subitles as it integrates into the complete video workflow and allows almost automatic adjustment of the timing. A nice how-to can be found here.