@Rakesh Indla If the recognition works in your local with the same code and not in your environment then the most likely cause could be the file cannot be read in your environment since it cannot fire an event for recognized. I would suggest providing the complete path of your file to be read or ensure the file is present with the required permissions for the speechrecognizer to read the file. Also, ensure the required libraries are installed to read a wav format file in your environment, usually the libraries that are installed for SDK should take of this dependency while installing the SDK.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.