Skip to content

aaryan498/Wishing-Code-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🌟 Wishing Code in Python 🌟


📜 Project — Wishing Code in Python

Wishing Code in Python (Wishing-code-Python) is a personal creative project — a lightweight script that greets the user based on the current system time and speaks the greeting using an offline Text-to-Speech engine (pyttsx3).
It’s perfect for practising conditional logic, time handling, and simple automation in Python.


📂 File structure

  • wisher.py — Main Python script (detects time, prints & speaks greeting)
  • README.md — Project documentation

⚙� Features

  • Reads current system date and time (Python time module).
  • Chooses greeting by hour ranges:
    • 00:00–05:59 → Early Morning
    • 06:00–11:59 → Morning
    • 12:00–15:59 → Afternoon
    • 16:00–20:59 → Evening
    • 21:00–23:59 → Night
  • Speaks greetings using pyttsx3 (offline, cross-platform).
  • Prints a human-readable date and time stamp.

🚀 Quick start

  1. Ensure you have Python 3.x installed on your system.
  2. Install dependency:
    pip install pyttsx3
  3. Place wisher.py in your desired folder.
  4. Run the script:
    python wisher.py
    You’ll see the printed date/time and hear the spoken greeting.

🛠Notes & troubleshooting

  • If you hear no voice on Windows: check system audio settings and ensure an installed TTS voice is available.
  • If pyttsx3 installation fails: try python -m pip install --upgrade pip and reinstall.
  • Change timestamp format by editing the time.strftime calls in wisher.py. For example:
    '%I:%M:%S %p' → 12-hour format with AM/PM
    '%H:%M:%S' → 24-hour format
  • You can test different greetings by manually setting the hour variable.

✨ Customization ideas

  • Save each greeting with timestamp to a log file.
  • Play a custom sound along with the spoken greeting.
  • Add command-line flags to choose greeting type.
  • Convert it into a desktop app using tkinter or bundle with pyinstaller.

👨�💻 Author


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages