find command from command list by Python and natural language processing
I want to build a speech recognition system so that when I give an instruction it can execute the command I want. I came and said the voice through the microphone and gave it to a model (speech to text ) to return the text. Now I want to know which command this text belongs to among the different commands.
for example : The command I said through the microphone: Shut down the system the system Shut down Shut down
Or another command Turn on the system
My command list:
command_list = ["open" ,"shut down " , "close " , "turn of " ,........]
Can you tell me what code to write in Python and natural language processing?