Hi Utakarsha
Attached is an Enhanced Project that works with the actual Arduino Hardware + Sketch that I have already posted, AppToArduino_Cmds.txt.
As I mentioned before, keep the spoken commands short for best possible success with speech-to-text. In my code, when the User speaks, the result is compared to a list of the available commands - if found, the command is sent, if not found, the User is asked to try again.
BT_Basic_Setup_Send_Cmds.aia (9.9 KB)
Click on the Blocks image to see it full-size.
The voice command method I show here has been proven to work, used to drive a robot.