We generally do not take breaks when we are using our laptop or PC. It might affect our eyesight as well as mind. So with Python, we can make a program that can notify us that we have to take a break start again after sometime when the user again starts working on the laptop.
- pyttsx3 – It is a text-to-speech conversion library in Python. An application invokes the pyttsx3.init() factory function to get a reference to a pyttsx3. It is a very easy to use tool which converts the entered text into speech. To install this module type the below command in the terminal.
pip install pyttsx3
- plyer – Plyer module is used to access the features of the hardware. This module does not comes built-in with Python. We need to install it externally. To install this module type the below command in the terminal.
pip install plyer
When we start our laptop or PC we will just have to run the Python program and we will schedule the operation like after every 50 min our PC or laptop will give us a notification as well as speak to us to take a break. Many times we just ignore the notifications that are given to us but with a laptop speaking us will help us remind that we have to take a break.
Creating the Speak Method:
Creating the Take_break method that will create a pop-up notification for our windows
Below is the Complete Code
Note: A voice command is also generated.
- numpy.take() in Python
- Python | Pandas dataframe.take()
- Python | Pandas TimedeltaIndex.take()
- Python | Pandas Series.take()
- Take Matrix input from user in Python
- Python | Numpy matrix.take()
- How to take screenshots using python?
- How to take screenshot using Selenium in Python ?
- Take input from stdin in Python
- How to take integer input in Python?
- Python | Add Logging to a Python Script
- Python script to open a Google Map location on clipboard
- Run Python script from Node.js using child process spawn() method
- Autorun a Python script on windows startup
- Python | Accepting Script Input
- Python Script to Shutdown Computer
- Python Script to Restart Computer
- Python Script to Logout Computer
- Run python script from anywhere in linux
- Get directory of current Python script
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.