Watch our YouTube tutorial on how to use this here!
The Bunk Bot is built on Python and its main purpose is to attend your online meetings/classes for you.
This bot gets the meeting ID of your meeting from Google Docs (note: your friend can upload this for you if you can't) 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 Meetings, Microsoft Teams or any other software you use to attend class.
A small amount of the code you see in this repository is hardcoded w.r.t to my computer. Changes that you have to make to implement this on your computer are:
- Change all the coordinates that PyAutoGUI uses. Refer to
coordinate_finder.py
to find the coordinates which are suitable for you (if you didn't understand any of this, please read the PyAutoGUI documentation). - Change the file paths.
- Change the size of the crop in
crop=img1[280:911,1520:1900]
tocrop=img1[y1:y2,x1:x2]
wherex1
,x2
,y1
andy2
are coordinates of the chatbox in the online classroom software (i.e Google Meet/ Zoom etc.)
These changes can be made in the global variables that is mentioned in the bunk_bot.py file. Can be found in the 15th line.
- An unknown exception thrown during image processing has been handled.
- Circular import error has been fixed
- Test files to check the working of the PyTesseract and Speech Recognition Libraries have been added to the folder Test Files. Use these to verify that you've downloaded them and that they're working.
Currently planning on making a ChatBot which can hopefully have full fleged conversations.
You can provide your suggestions on this here.
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.