You say you use the LAMP stack, which implies you rely on PHP. Voice recognition is an expensive job and it would be done faster if processed by an external worker written in a lower-level language like C or C++. Furthermore, AFAIK there is no native PHP solution to do this kind of work.
PHP allows library loading on runtime and I think this is the way to go. If I were you I would write a thin wrapper around a C/C++ voice recognition library and call it from the PHP code. See this SO answer for more details on how to write such an extension.
Some open-source voice recognition libraries you could wrap around:
- CMU Sphinx (written in C, API in C and C++)
- Voce (CMU Sphinx wrapper, API in C++ and Java)
As you notice there is no trivial solution, but it is still doable. Good luck!