Guide to Speech Recognition with Python
realpython.com
realpython.com
Large company APIs will usually be better at generic speaker, generic language recognition - but if you can do speaker adaptation and customize the language model, there are some insane gains possible since you prune out a lot of uncertainty and complexity.
If you are more interested in recognition and alignment to a script, "gentle" is great [2][3]. The guts also have raw Kaldi recognition, which is pretty good for a generic speech recognizer but you would need to do some coding to pull out that part on its own.
For a decent performing deep model, check into Mozilla's version of Baidu's DeepSpeech [4].
If doing full-on development, my colleague has been using a bridge between PyTorch (for training) and Kaldi (to use their decoders) to good success [5].
[0] how I use pocketsphinx to get phonemes, https://github.com/kastnerkyle/ez-phones
[1] https://github.com/cmusphinx/pocketsphinx-python
[2] https://github.com/lowerquality/gentle
[3] how I use gentle for foreced alignment, https://github.com/kastnerkyle/raw_voice_cleanup/tree/master...
These models are way easier to train, have surprisingly good accuracy, and are robust to noise.
From prior use, Google's speech API (at least the "video" model) is freakishly accurate compared to DeepSpeech to where I wondered if they used closed captioning to help train their model. But I haven't seen rest of these at work: https://i.imgur.com/cdOlARO.png
I had to leave a lot out of this that I wish could have gone in, simply due to length constraints. In that regard, perhaps "The Ultimate Guide to Speech Recognition" wasn't be best choice of title. I'm sure that we'll be updating this article as time goes on, and Google's streaming API is something I want to make sure goes in it.
Also, something that was left out of the article was SpeechRecognition's listen_in_background method, which does solve this problem somewhat. My issue with it is that SpeechRecognition uses a somewhat crude RMS energy based VAD for detecting speech.
Thanks for your feedback!
I found LTSD pretty robust compared to simpler energy based things as long as you have a small chunk of background sound at the start. The LTSD implementation is largely from my friend Joao, so I can't take credit for the cool part, only the bugs
[0] https://gist.github.com/kastnerkyle/a3661d6be10a0ae9e01fd429...
One of the things I like in HNews is that there's often someone who can join discussion and add something to it.
Clearly it's worth to learn and discuss from experience of others to see broader spectrum. Thanks to the author for looking here and dropping few lines.
Speech recognition with the Python "speech" module:
https://jugad2.blogspot.in/2014/03/speech-recognition-with-p...
Speech synthesis in Python with pyttsx:
https://jugad2.blogspot.in/2014/03/speech-synthesis-in-pytho...
Check out the synthetic voice announcing an arriving train in Sweden (near top of 2nd post above).
This not correct. Most modern speech recognition systems are based on deep neural nets (DNN).