This Python project fetches real-time weather data and reads it aloud using a robotic voice. It uses WeatherAPI to retrieve weather details and pyttsx3 for text-to-speech functionality.
- π Get real-time weather updates for any city
- π Robotic voice assistant (using
pyttsx3
) - π Fetches details like temperature, humidity, region, and time
- π Error handling for incorrect city names or network issues
- Python
requests
(for fetching weather data)json
(for parsing API response)pyttsx3
(text-to-speech conversion)
git clone https://github.com/imshaa/WeatherForecast.git
cd weather-forecast-voice
pip install requests pyttsx3
- The program asks the user for a city name
- It fetches real-time weather data from WeatherAPI
- The robotic voice speaker (pyttsx3) reads out the weather details
python weather_forecast.py
Then enter a city name when prompted. The program will fetch the weather and read it out loud.
This project uses pyttsx3
, a text-to-speech conversion library in Python that works offline. It supports multiple voice properties:
- Rate (speed of speech)
- Volume
- Different voice types (male/female)
By default, it reads weather details in a robotic voice to make the experience more interactive.
Enter the name of the city: London
π "Here is the weather information for London. The temperature is 15 degrees Celsius. The humidity is 80%."
- β Add voice input support
- β Improve speech clarity and intonation
- β Display additional weather details like wind speed
Feel free to fork this project and improve it! Pull requests are welcome. π
This project is open-source and available under the MIT License.
π Follow for more cool projects! π