In voice recognition system, how to match digital input to a given word without seconds delay? I've been looking around and found some great C/C++/Java libraries like CMU Sphinx or Windows SAPI. I did not like SAPI, and CMU Sphinx is way too complicated... would need months to understand how it works.

So I would like to start writing my own library, even it would be crap, but to understand all the parts how to recognize a word in real-time.

Now comes in my head a question,... how to match digital input to a given word? How to make it without seconds delay?

So what I understand is that I pass the input into buffer and I have to process it. First I try to create some spectrogram (time, frequency, amplitude) and then to use Fast Fourier Transform. In the database/list I will have stored words with their phonemes.

But how do I match these phonemes with FFT output? I simply do not understand all the steps.
There is a massive range of possible sounds that a human might recognize (or mis-recognize) as the same word in their language.  The problem is searching a large dimensional space representing all those possibilities (continuous variations of spectral and timing differences) for the closest match, perhaps also given some context around the search target for the most probable of multiple near matches.  This is a computational complexity problem that can sometimes be reduced in time by more computational power (a 1000 processor server or supercomputer might be able to do it in less than "seconds" of delay).

Or you can search over less degrees-of-freedom with less robustness or accuracy, and perhaps miss most possible word matches.