Voice recognigtion in unity 2019 not working

The voice recognition in my unity project used to work but now it doen’t. When it starts now i get an error where: UnityException: “Speech recognition is not supported on this machine.”

The code that seems to be causing the problem is this line: “PhraseRecognitionSystem.Restart();”

investigating the problem further it seems to only happens in the editor not when the program is built