DAY 1 .IRON MAN JARVIS (PROJECT 1 ) USING PYTHON
import pyttsx3 import speech_recognition as sr #pip install speechRecognition import datetime import wikipedia import webbrowser import os import smtplib engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') # print(voices[1].id) engine.setProperty('voice', voices[0].id) def speak(audio): engine.say(audio) engine.runAndWait() def wishMe(): hour = int(datetime.datetime.now().hour) if hour>=0 and hour<12: speak("Good Morning!") elif hour>=12 and hour<18: speak("Good Afternoon!") else: speak("Good Evening!") speak("I am Jarvis Sir. Please tell me how may I help you") def takeCommand(): #It takes microphone input from the user and returns string #output r = sr.Recognizer() with sr.Microphone() as source: print("Listening...") r.pause_threshold = 1 audio = r.listen(source) try: p