Coder Social home page Coder Social logo

jarvis-ai's Introduction

Jarvis-AI

jarvis-ai's People

Contributors

founder-of-mak-academy avatar

Stargazers

Uday Sohal  avatar Prosonjit Das avatar Yayady avatar Rana Jay Pratap Singh avatar Kamal Yeshodhar Shastry Gattu avatar Mario Papetti avatar Dennis Chen avatar Xaxeric avatar Karan avatar mohcinebouzalim avatar Quresh Lakdawala avatar Radwane Lourhmati avatar

Watchers

Abhishek kumar avatar Mario Papetti avatar  avatar

jarvis-ai's Issues

JARVIS. A student of yours from udemy

Hello sir i have a problem with the Jarvis coding. My code takes in input, recognizes input but doesn't give out voice output

import pyttsx3 #pip install pyttsx3
import speech_recognition as sr
import datetime
import wikipedia

engine = pyttsx3.init()

def speak(audio):
engine.say(audio)
engine.runAndWait()

def time_():
Time=datetime.datetime.now().strftime('%I:%M:%S')
speak ("The current time is")
speak(Time)

def date_():
year = datetime.datetime.now().year
month = datetime.datetime.now().month
date = datetime.datetime.now().day
speak("The current date is")
speak(date)
speak(month)
speak(year)

def wishme():
speak("Welcome back Mac-Roy!")
time_()
date_()

#greetings

hour = datetime.datetime.now().hour

if hour>=6 and hour<12:
    speak("Good Morning Sir!")
elif hour>=12 and hour<18:
    speak("Good Afternoon Sir!")
elif hour>=18 and hour<24:
    speak("Good Evening Sir!")
else:
    speak("Good Night Sir!")

speak("Jarvis at your service")
speak("What can i do for you sir?")

def TakeCommand():
r = sr.Recognizer()
with sr.Microphone() as source:
print("Listening...")
r.pause_threshold = 1
audio = r.listen(source)
try:
print("Recognizing...")
query = r.recognize_google(audio, language='en-pk')
print(query)

except Exception as e:
    print(e)
    print("Say that again please...")
    return "None"
return query

if name == "main":

wishme()

while True:
    query = TakeCommand().lower()

#All commands will be stored in lower case in query
#for easy recognition

if 'time' in query: #tells the time when asked
    time_()

elif 'date' in query: #tells date when asked
    date_()

elif 'wikipedia' in query:
    speak("Searching........")
    query=query.replace('wikipedia','')
    result=wikipedia.summary(query,sentences=3)
    speak('According to wikipedia')
    print(result)
    speak(result)

Whatsapp feature

Traceback (most recent call last):
File "C:\Users\kille\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pywhatkit\main.py", line 322, in
file = open("pywhatkit_dbs.txt", "r", encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'pywhatkit_dbs.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:/Users/kille/Desktop/Seb stan AI/Seb Stan AI.py", line 20, in
import pywhatkit as kit
File "C:\Users\kille\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pywhatkit_init_.py", line 8, in
from pywhatkit.main import print_sleep_time, check_window, sendwhatmsg, sendwhatmsg_to_group, info, playonyt, search, close_tab, sendwhatmsg_instantly, sendwhats_image
File "C:\Users\kille\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pywhatkit\main.py", line 325, in
with open("pywhatkit_dbs.txt", "w", encoding="utf-8") as file:
PermissionError: [Errno 13] Permission denied: 'pywhatkit_dbs.txt'

I am facing this error, can someone please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.