Jarvis Desktop Assistant With GUI Using Python | best python project



 Presentation 

Jarvis who was the private voice colleague of Iron man for example Tony Stark. It wont to control all machines and robots of Tony Stark, Iron man Suit. this is frequently on Voice Command, one such Voice Assistant which is male I even have made it named Jarvis and It deals with my Voice Command, I even have been performing on this for an all-inclusive time, since I saw the Iron-man film, from that point forward I used to gather thoughts and information to shape this,it was distinctly for my PC.

Right now will have the option to disclose to you approaches to shape your own Jarvis Desktop Assistant with GUI.

I utilized Python programing language to make it.
So how about we look at the code of this work area colleague

Also read :  Bluehost Review 2020 | Is Bluehost is worthy for price [truth revealed] - best review

Module we requirement for this Desktop Assistant
  • Espeak - on the off chance that you are in linux based working framework. In windows you didn't need to introduce this espeak 
  • Pyttsx3 
  • Tkinter 
  • Operating system 
  • PIL
  • Random 
  • Time 
  • Webbrowser 
  • Subprocess

Also read : How to create Snake Game Using Python | Pygame Tutorial

Order to install Modules
  • Espeak - In Linux - sudo adept introduce espeak 
  • In windows - sapi5 is preinstalled 
  • Pyttsx3 - pip introduce pyttsx3 
  • Tkinter - pip introduce tkinter 
  • Operating system - preinstall 
  • PIL - pip introduce PIL 
  • Arbitrary - preinstall 
  • Time - preinstall 
  • Webbrowser - preinstall 
  • Subprocess - preinstall 

For installing python programming language simple to have to click to this link given below -

 Download Python from this link





Code For Jarvis Desktop Assistant

import random         
import tkinter          # pip install tkinter
from tkinter import *
import datetime    
import pyttsx3          # pip install pyttsx3
import os
import time
import subprocess
import webbrowser
from tkinter import _tkinter
from PIL import ImageTk,Image     # pip install PIL
engine = pyttsx3.init()
# in windows
# engine = pyttsx3.init('sapi5')
window = Tk()
window.configure(bg = "black")  
SET_WIDTH = 800
SET_HEIGHT = 700
global ques
ques = Entry(window,width=40,bg="black",fg="white",font = ('arial',18,'bold'))  
ques.pack(padx = 10,pady = 20)
def speak(audio):
    engine.say(audio)
    engine.runAndWait()
def wish():
    hour = int(datetime.datetime.now().hour)
    if hour == 0 and hour<=12:
        speak("Good morning sir")
    elif hour>=12 and hour<=18:
        speak("Good afternoon sir")
    else:
        speak("Good evening sir")
def command():
    if 'open desktop' in ques.get():
       
        speak("ok sir do it ")
        # d = "C:\Users\Public\Desktop"
        os.startfile(d)
        # or
        # os.system(d)
       
    elif 'open file' in ques.get():
       
        speak("which file sir ")
        d = Toplevel()
        Toplevel.configure(bg="black")
        e = Entry(d,bg = "black", fg = "white" ,width = 20)
        e.pack()
        def open_file():
            os.system(e.get())
            speak("ok sir i will open "+e.get())
        s = Button(d,bg = "black",font = ('arial',18,'bold'),fg  = "white",width = 10,activeforeground = "grey",activebackground = "black",text = "open it",command=open_file).pack()
    elif 'shutdown' in ques.get():
        os.system("shutdown now -h")
        speak("ok sir i shutdown the computer")
    elif 'open stackoverflow' in ques.get():
        speak("ok sir i will open the stck over flow website")
        webbrowser.open("https://wwww.stackoverflow.com")
    elif 'open website' in ques.get():
        speak("which website sir ")
        d = Toplevel()
        e = Entry(d,bg = "black", fg = "white" ,font = ('arial',18,'bold'),width = 20)
        e.pack()
        def open_web():
            webbrowser.open("https://"+e.get()+".com")
            speak("ok sir i will open "+e.get())
        s = Button(d,bg = "black",fg  = "white",width = 10,activeforeground = "grey",activebackground = "black",text = "open it",command=open_web).pack()
    elif 'open google' in ques.get():
        speak("ok sir i will open google.com")
        webbrowser.open("https://wwww.google.com")
    elif 'open youtube' in ques.get():
        speak("ok sir i will opwn youtube dot com")
        webbrowser.open("https://wwww.youtube.com")
    elif 'copy code' in ques.get():
        speak("of which file sir ")
        d = Toplevel()
        e = Entry(d,bg = "black",font = ('arial',18,'bold'), fg = "white" ,width = 20)
        e.pack()
        def open_code():
            file = open(e.get(),"r+")
            re = file.read()
            speak(re)
        s = Button(d,bg = "black",fg  = "white",width = 10,activeforeground = "grey",activebackground = "black",text = "open it",command=open_code).pack()
       
    elif 'exit' in ques.get():
        exit()
        speak("good bye sir have a good day")
    elif 'quite' in ques.get():
        speak("good bye sir have a good day")
        exit()
    else :
        speak("sorry sir i can not do this")
   
def you():
    speak("ok sir open the youtube.com")
    webbrowser.open("https://www.youtube.com")
def win():
    speak("ok sir i open it")
    webbrowser.open("https://techflayer.blogspot.com")
   
def main():
    # screen
    bgImg = Image.open("/home/abhishek/Desktop/Assistants/back.png")
    window.title("J.A.R.V.I.S")
    canvas = tkinter.Canvas(window,width = SET_WIDTH,height = SET_HEIGHT)
  
   
    # image=ImageTk.PhotoImage(Image.open("back.png")
    image=ImageTk.PhotoImage(bgImg)
    canvas.create_image(0,0,anchor=NW,image=image)
    # entry
    btn = Button(text = "Open Techflayer" ,bg = "black" ,fg="white",width=20,activeforeground = "grey",activebackground = "black",command = win)
    btn.pack(padx = 0,pady= 0)
    btn = Button(text = " Open Youtube" ,bg = "black",fg = "white" ,width = 20,activeforeground  = "grey" ,activebackground = "black",command =you)
    btn.pack(side = TOP)
    btn = Button(bg = "black" ,fg = "white",width=20,activeforeground = "grey",activebackground = "black",text = "command",command=command).pack(side = BOTTOM,pady = 1 , padx = 3)
    canvas.configure(bg="black")
   
   
    shape = canvas.create_oval(10,10,60,60,fill = "blue")
    xspeed = random.randrange(1,8)
    yspeed = random.randrange(1, 8)
    shape2 = canvas.create_oval(10,10,60,60,fill = "blue")
    xspeed2 = random.randrange(1,9)
    yspeed2 = random.randrange(1,9)
    canvas.pack()
   
    while True:
        canvas.move(shape,xspeed,yspeed)
        pos = canvas.coords(shape)
        if pos[3]>= 700 or pos[1] <=0:
            yspeed = -yspeed
        if pos[2] >= 800 or pos[0] <=0:
            xspeed= -xspeed
        canvas.move(shape2,xspeed2,yspeed2)
        pos = canvas.coords(shape2)
        if pos[3]>= 700 or pos[1] <=0:
            yspeed2 = -yspeed2
        if pos[2] >= 800 or pos[0] <=0:
            xspeed2= -xspeed2                               
        window.update()
        time.sleep(0.01)
   
def ball():
    canvas = Canvas()
if __name__ == "__main__":
    wish()
    main()
window.mainloop()

download the code from this link

Conclusion - 

Create desktop assistant i.e. Jarvis and you'll submit it as your the school project otherwise you can use it on your computer too. Friends, if you need to get the present day updates of our website, then please join our Techflayer, this can maintain you from getting the state-of-the-art updates about our upcoming.

Also read : How to Create WordPress Website with Bluehost | Step by Step Tutorial for Starters in 2020

Buy related products - 

Buy AMD Ryzen 5 3600 Desktop Processor 6 Cores up to 4.2 GHz 35MB Cache AM4 Socket (100-000000031)




In INR




Motherboard 


GIGABYTE GA-A320M-S2H AMD A320 AM4 MAX-32GB DDR4 Micro ATX PCIE16




Also read : How to make WordPress website with BlueHost in 10 minutes | best hosting BlueHost
Also read : Straightforward Forex Tricks You Can Use Today

Also read : How Social Media Can Impact Your SEO In 2020 | Information about SEO

new posts, and recollect to follow us you'll locate the observe button on sidebar click and observe us , take into account to remark your thoughts , buddies will see you once more for this day, bye bye to you till then. Have a pleasing day

Comments