Hello,
Welcome to Microsoft Q&A.
I tested the code above, and encountered the same exception(file not found).
You could let your users check if the Speech Recognize feature is enabled in local machine(type Speech Recognize in Search box). And check if the language used(such as English(United States)) enables Speech(Open Setting > Time & Language > Language > Preferred languages, click English(United States) > Options).
If the Speech Recognize feature is not supported, you need to enable it.
There are two way you could try to enable the feature:
- Find your language in Language (Settings > Time & Language), click Options, click Download button under Speech to enable the Speech feature for the language.
- Open Speech (Settings > Time & Language), click Add voices under Manage voices, select needed language to Add.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.