JARVIS
JARVIS
JARVIS
import pyautogui
import pyttsx3
import pywhatkit
import requests
import speech_recognition as sr
import datetime
import os
from requests import get
import wikipedia
import webbrowser
import pywhatkit as kit
import sys
import pyjokes
import smtplib
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
print(voices[0].id)
engine.setProperty('voices' , voices[0].id)
#text to speech
def speak(audio):
engine.say(audio)
engine.runAndWait()
print(audio)
try:
print('Recognizing...')
query = r.recognize_google(audio, language= 'en-in')
print(f"user said: {query}")
except Exception as e:
speak('Say that again please...')
return "none"
return query
#to wish
def wish():
hour = int(datetime.datetime.now().hour)
if __name__ == '__main__':
wish()
while True:
query = takecommand().lower()
except Exception as e:
print(e)
speak('Sorry sir, coudnt send the mail, if it is an important
message, why not try sending using whatsapp')
except Exception as e:
speak('sorry sir, i am not able to trach GPS for the moment, is
there anything else i can help u with...')
except Exception as e:
print(e)
speak('sorry sir, i could not open the server')