The idea of ​​this code is: when you say one of the keywords (the huge list of if) something happens in Minecraft Java Edition. I modified the code using VOSK-PT-BR so that I could speak the words in Portuguese, since in the original code, if I didn't speak the words in English, the program wouldn't recognize anything, so nothing would happen in Minecraft. The problem is that: in the initial code, the original, when I started the script I could send: "python mcrecog.py -m" in cmd and a list would appear with all the microphones that were connected to my PC (I could choose to change if the program hadn't recognized my audio). In this modified version that I made, when I start the game, my microphone is not recognized. Even if I use "python mcrecog.py -m" in cmd, a small list of 3 options appears for me to change the microphone and none of them work. The microphone continues to be unrecognized and not a single word is captured by the program. I would like to know how to fix it, or what could be causing this.
Below is the original code (first code) and the modified code (second code)