Windows has API for speech recognition, it also provides system apps that perform speech recognition and execute recognised command. Is there a way/API to send commands programmatically? Text and Audio file is acceptable. But please don't suggest using virtual mic, thanks!
Clarification:
playing back audio outloud is not the way
Since an audio file is acceptable, you can use the text to speech API to generate speech by the entered command and save that to a file that you can pass to the speech recognition API.
Although I have found one question talking about the quality of the file and has an answer on how to fix it, either way if it recognizes it with no issues then you don't have to deal with the quality.