Speech to Text api/library
If you'd have searched for java speech recognition, you would've found the Java Speech API or short JSAPI
This is rather typical Question. Anyhow depending on the language you are using there may be many different choices.
Java http://voce.sourceforge.net/
PHP http://www.speechapi.com/ and http://cmusphinx.sourceforge.net/
Basically, the best option for you is to use some online cloud-based API, that will take your .wav input and return you the response in the text.
In this way, your API will be accessible from any language and will take a lot of pain out of your code.