Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def listen(): #Definition of listen() function.
- wait = 0
- print ("Listening!")
- for word in speech:
- word_string = str(word)
- if (word_string == "START"): #Listens for the word "Start."
- print("Primary Function Executed.")
- if (word_string == "REST"): #Listens for the word "Rest."
- print ("In loop")
- wait = 1
- while (wait == 1): #Safety loop.
- for cap in speech:
- cap_string = str(cap)
- if (cap_string == "OKAY"):
- listen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement