Posts

Showing posts with the label jarvis

Jarvis AI Assistant Python Script

import pyttsx3 #pip install pyttsx3 import datetime import speech_recognition as sr #pip install speechRecognition import wikipedia #pip install wikipedia import webbrowser # import pyaudio import os import random import smtplib engine = pyttsx3.init("sapi5") voices = engine.getProperty("voices") # print(voices) # print(voices[0].id) # print(voices[1].id) engine.setProperty("voice", voices[1].id) def speak(audio): engine.say(audio) engine.runAndWait() def greetMe(): hour = datetime.datetime.now().hour # print(hour) # print(type(hour)) if hour >= 0 and hour < 12: print("Good Morning!") speak("Good Morning!") elif hour >= 12 and hour < 18: print("Good Afternoon!") speak("Good Afternoon!") elif hour >= 18 and hour < 20: print("Good Evening!") speak("Good Evening!") else: print("