The Bunk Bot is built on Python and its main purpose is to attend your online classes for you.
This bot gets the meeting ID of your meeting from Google Docs (note that you need a friend to upload this for you) and opens Google Meet and logs in on your behalf.
It can use both Speech Recognition and Image Processing techniques to interact with other people in the meeting.
Once the meeting is done, it closes the Google Chrome page and this process continues every time you have an online class to attend.
Speech Recognition is used to identify whether your enrollment number is being called out during attendance and the bot automatically types "present" in the chatbox.
Image Processing is used to convert all the messages in the chatbox into an array of strings and uses some string manipulation techniques to find the most common phrase most of the students said and type it in the chat box. For example, if 5 people said the answer was "11.5", the bot will type "11.5" in the chatbox and send it.
Libraries used:
-
Image: Used for image processing. View the documentation here.
-
WinSound: Can be used for playing a pre-recorded voice note of yourself saying "present". In this project, it has been used for signalling purposes. View the documentation here.
-
PyAutoGUI: Simulates the mouse and keyboard. View the documentation here.
-
PyTesseract: Converts images to text. View the documentation here.
-
RE: Regular expressions for NLP. View the documentation here.
-
Cv2: Used for image processing. View the documentation here.
-
DateTime: Used to time the speech recognition and the image processing algorithms and give them specific times to run View the documentation here.
-
speech_recognition: Used for speech to text conversion. View the documentation here.
-
PyAudio: Used to access the microphone. View the documentation here.
Changing the coordinates in pyautogui is more than enough to implement this code on google meet,zoom,microsoft teams or any other software you use to attend class
A small amount of the code you see in this program is hardcoded w.r.t to my pc. Changes that you have to make to implement this on your pc are:
1)Change all the coordinates that pyautogui uses. Refer to help.py to find the coordinates which are suitable for you(if you didnt understand any of this, please read the pyautogui documentation).
2)Change all the file paths.
3)Change the size of the crop in crop=img1[280:911,1520:1900] to crop=img1[y1:y2,x1:x2] where x1,x2,y1 and y2 are coordinates of the chatbox in google meet or Zoom
Currently planning on making a chat bot which can hopefully have full fleged conversations.
Please contribute and make this better lads.
For legal reasons,
This bot was purely made for educational purposes only and is meant as a fun way to learn and implement the libraries/packages mentioned above.
This bot is not meant to be used in any malicious way and we are not responsible for anyone actually using this bot to wrongfully attend online classes on his/her/their behalf.