Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. def listen(): #Definition of listen() function.
  2. wait = 0
  3. print ("Listening!")
  4. for word in speech:
  5. word_string = str(word)
  6. if (word_string == "START"): #Listens for the word "Start."
  7. print("Primary Function Executed.")
  8. if (word_string == "REST"): #Listens for the word "Rest."
  9. print ("In loop")
  10. wait = 1
  11. while (wait == 1): #Safety loop.
  12. for cap in speech:
  13. cap_string = str(cap)
  14. if (cap_string == "OKAY"):
  15. listen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement