Repo For IBM AI Analyst Certification Course and other Generative AI Projects
This Python script is a basic desktop assistant with speech recognition and integration with various APIs and services. The assistant interacts with the user through speech and provides responses using text-to-speech.
The desktop assistant comes with the following features:
-
Website Navigation: Open popular websites with a voice command. Ask the assistant to open websites like YouTube, Google, Wikipedia, etc.
-
Time Display: Get the current time by asking the assistant, "What's the time?"
-
Artificial Intelligence Responses: The assistant uses OpenAI's GPT-3.5 model to provide AI-generated responses. Ask it questions related to "Artificial Intelligence" to get informative answers.
-
News Headlines: Stay updated with the latest sports headlines from India. Ask for "news" or "headlines," and the assistant will fetch and read them out to you.
-
Conversational Mode: Engage in a conversation with the assistant. It keeps track of the conversation history and provides context-aware responses.
-
Stop Talking and Reset Chat: End the conversation by telling the assistant to "stop talking." You can also reset the chat history with the command "reset chat."
To run the desktop assistant, you will need the following:
- Python 3.x installed on your system.
- Required Python packages installed (use
pip install -r requirements.txt
to install them). - Environment variables set in a
.env
file:OPENAI_API_KEY
: API key for the OpenAI GPT-3.5 model.NEWS_API_KEY
: API key for accessing the News API.
The text-to-speech functionality (win32com.client) is designed for Windows systems. If you want to run the script on other platforms, you'll need to modify the text-to-speech implementation accordingly.