In my opinion, the focus here should be on the fact that this is a state of the art AI which beats Facebook's wav2vec2 by a relative 16% improvement, Scribosermo (based on NVIDIA NeMo) by a relative 44% and Mozilla's DeepSpeech German by a relative 75% improvement. People usually don't share their production-quality tools ;)
That said, I wrote "284 lines of C++" to indicate that this is compact enough for people to actually read and understand the source code. Also, compiling my implementation is super easy and straightforward ... something which can't be said for Kaldi, Vosk, or DeepSpeech.
If you try to read the CTC beam search decoder from Mozilla's DeepSpeech [1], that alone is about 2000 LOC in multiple files. If you try to read the pyctcdecode source that is used by HuggingFace [2], that's 1000+ LOC of Python.
But this implementation is all the client-side, i.e. the entire "native_client" folder hierarchy in DeepSpeech [3], narrowed down to a mere 284 lines.
Also, both DeepSpeech and HuggingFace Transformers use TensorFlow as a dependency, i.e. just like me. So in my opinion, it doesn't make sense to include TF in the LOC comparison if all the AI speech recognition systems use it. That would be like including libstdc++, too.
[1] https://github.com/mozilla/DeepSpeech/tree/master/native_cli...
[2] https://github.com/kensho-technologies/pyctcdecode
[3] https://github.com/mozilla/DeepSpeech/tree/master/native_cli...
"16% better than wav2vec2, 44% better than Scribosermo, 75% better than DeepSpeech" was more than enough for a good headline. Of course everyone was going to get sand in their panties over "284 lines of C++", and now it's time to pay the HN pedantics piper.
I wanted to specifically highlight that people can (and should) read the source code. I now see that this might have been a mistake. But I was hoping to share the joy of taking a cool tool and looking under the hood.
I think you're fine, don't worry about it. It's cool and someone will always complain no matter what you write.
You cannot win. The top comments on HN are _always_ pedantry. These people will always find something to complain about or nitpick while completing missing the forest for the trees.
I clicked through for the code first, and then got interested in the research. Thanks for doing it the way you did :)
A speech recognizer is not an "AI".
Well, the acoustic model is created using deep learning loss-minimization by gradient descent, which is what people usually call AI these days.
Or ML.
By what definition, principle or authority do you determine what is AI?
Don't take this the wrong way, but I find that people with more knowledge of the subject tend to be more open about what they include, whereas people with less knowledge tend to do more gatekeeping. AI has a "moving goal post" issue that is notable enough to warrant a wikipedia page: https://en.wikipedia.org/wiki/AI_effect