()
| 23 | engine.say(audio) |
| 24 | engine.runAndWait() |
| 25 | def wishMe(): |
| 26 | hour=int(datetime.datetime.now().hour) |
| 27 | if hour>=7 and hour<12: |
| 28 | speak("Good Morning") |
| 29 | elif hour>=12 and hour<18: |
| 30 | speak("Good Afternoon") |
| 31 | elif hour>=18 and hour<21: |
| 32 | speak("Good Evening!") |
| 33 | else: |
| 34 | speak("Good night") |
| 35 | speak("Hello I am your personal desktop assistant. Please tell me how may i help you ") |
| 36 | def takeCommand(): |
| 37 | '''It takes microphone input from the user and returns string output''' |
| 38 | r=sr.Recognizer() |