├── README.md
├── lib
├── desktop.ini
├── exit - Copy.png
├── gifloader.gif
└── tuse.png
├── model.h5
├── rec.qrc
├── rec_rc.py
├── run.py
└── scifi.ui
/README.md:
--------------------------------------------------------------------------------
1 | # GUI-Jarvis
2 | place Model.h5 file into your python directory where lshotword is installed
3 |
--------------------------------------------------------------------------------
/lib/desktop.ini:
--------------------------------------------------------------------------------
1 | [LocalizedFileNames]
2 | 8871.gif=@8871.gif,0
3 | guanxian.gif=@guanxian.gif,0
4 |
--------------------------------------------------------------------------------
/lib/exit - Copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HemantKArya/GUI-Jarvis/ec845db6af7313b33e8acf5b25910a8c777e15a4/lib/exit - Copy.png
--------------------------------------------------------------------------------
/lib/gifloader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HemantKArya/GUI-Jarvis/ec845db6af7313b33e8acf5b25910a8c777e15a4/lib/gifloader.gif
--------------------------------------------------------------------------------
/lib/tuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HemantKArya/GUI-Jarvis/ec845db6af7313b33e8acf5b25910a8c777e15a4/lib/tuse.png
--------------------------------------------------------------------------------
/model.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HemantKArya/GUI-Jarvis/ec845db6af7313b33e8acf5b25910a8c777e15a4/model.h5
--------------------------------------------------------------------------------
/rec.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | lib/—Pngtree—hud ui future futuristic screen_5442146.png
4 | lib/tuse.png
5 | lib/8871.gif
6 | lib/exit - Copy.png
7 | lib/bar1.png
8 | lib/gifloader.gif
9 |
10 |
11 |
--------------------------------------------------------------------------------
/run.py:
--------------------------------------------------------------------------------
1 | from PyQt5 import QtWidgets, QtGui,QtCore
2 | from PyQt5.QtGui import QMovie
3 | import sys
4 | from PyQt5.QtWidgets import *
5 | from PyQt5.QtCore import *
6 | from PyQt5.QtGui import *
7 | from PyQt5.uic import loadUiType
8 | import pyttsx3
9 | import speech_recognition as sr
10 | import os
11 | import time
12 | import webbrowser
13 | import datetime
14 |
15 |
16 | flags = QtCore.Qt.WindowFlags(QtCore.Qt.FramelessWindowHint)
17 |
18 | engine = pyttsx3.init('sapi5')
19 | voices = engine.getProperty('voices')
20 | engine.setProperty('voice',voices[0].id)
21 | engine.setProperty('rate',180)
22 |
23 | def speak(audio):
24 | engine.say(audio)
25 | engine.runAndWait()
26 |
27 | def wish():
28 | hour = int(datetime.datetime.now().hour)
29 | if hour>=0 and hour <12:
30 | speak("Good morning")
31 | elif hour>=12 and hour<18:
32 | speak("Good Afternoon")
33 | else:
34 | speak("Good night")
35 |
36 | class mainT(QThread):
37 | def __init__(self):
38 | super(mainT,self).__init__()
39 |
40 | def run(self):
41 | self.JARVIS()
42 |
43 | def STT(self):
44 | R = sr.Recognizer()
45 | with sr.Microphone() as source:
46 | print("Listning...........")
47 | audio = R.listen(source)
48 | try:
49 | print("Recog......")
50 | text = R.recognize_google(audio,language='en-in')
51 | print(">> ",text)
52 | except Exception:
53 | speak("Sorry Speak Again")
54 | return "None"
55 | text = text.lower()
56 | return text
57 |
58 | def JARVIS(self):
59 | wish()
60 | while True:
61 | self.query = self.STT()
62 | if 'good bye' in self.query:
63 | sys.exit()
64 | elif 'open google' in self.query:
65 | webbrowser.open('www.google.co.in')
66 | speak("opening google")
67 | elif 'open youtube' in self.query:
68 | webbrowser.open("www.youtube.com")
69 | elif 'play music' in self.query:
70 | speak("playing music from pc")
71 | self.music_dir ="./music"
72 | self.musics = os.listdir(self.music_dir)
73 | os.startfile(os.path.join(self.music_dir,self.musics[0]))
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | FROM_MAIN,_ = loadUiType(os.path.join(os.path.dirname(__file__),"./scifi.ui"))
86 |
87 | class Main(QMainWindow,FROM_MAIN):
88 | def __init__(self,parent=None):
89 | super(Main,self).__init__(parent)
90 | self.setupUi(self)
91 | self.setFixedSize(1920,1080)
92 | self.label_7 = QLabel
93 | self.exitB.setStyleSheet("background-image:url(./lib/exit - Copy.png);\n"
94 | "border:none;")
95 | self.exitB.clicked.connect(self.close)
96 | self.setWindowFlags(flags)
97 | Dspeak = mainT()
98 | self.label_7 = QMovie("./lib/gifloader.gif", QByteArray(), self)
99 | self.label_7.setCacheMode(QMovie.CacheAll)
100 | self.label_4.setMovie(self.label_7)
101 | self.label_7.start()
102 |
103 | self.ts = time.strftime("%A, %d %B")
104 |
105 | Dspeak.start()
106 | self.label.setPixmap(QPixmap("./lib/tuse.png"))
107 | self.label_5.setText(""+self.ts+"")
108 | self.label_5.setFont(QFont(QFont('Acens',8)))
109 |
110 |
111 | app = QtWidgets.QApplication(sys.argv)
112 | main = Main()
113 | main.show()
114 | exit(app.exec_())
--------------------------------------------------------------------------------
/scifi.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Form
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1920
10 | 1080
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 0
20 | 0
21 | 1920
22 | 1080
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | :/redc/lib/tuse.png
33 |
34 |
35 | true
36 |
37 |
38 |
39 |
40 |
41 | 580
42 | 290
43 | 821
44 | 461
45 |
46 |
47 |
48 |
49 |
50 |
51 | :/redc/lib/gifloader.gif
52 |
53 |
54 | true
55 |
56 |
57 |
58 |
59 |
60 | 40
61 | 200
62 | 391
63 | 71
64 |
65 |
66 |
67 | <html><head/><body><p align="center"><span style=" font-size:12pt; color:#ffffff;">23 OCT 2020</span></p></body></html>
68 |
69 |
70 |
71 |
72 |
73 | 1620
74 | 130
75 | 221
76 | 71
77 |
78 |
79 |
80 | background-image: url(:/redc/lib/exit - Copy.png);
81 | border:none;
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------