This repository contains a voice-enabled chatbot based on OpenAI's API text-davinci-003. You can talk and chat with this chatbot as if you were conversing with a person. The chatbot is available in both GUI and non-GUI versions, providing flexibility to suit your preferences.
Follow these steps to set up and run the chatbot:
- Clone this repository:
git clone https://github.com/shahdivax/VoiceEnabled_Chatbot.git
- Change into the project directory:
cd VoiceEnabled_Chatbot
- Install the required dependencies:
pip install -r requirements.txt
Note: Installing PyAudio
might require additional steps on some systems. If you encounter any issues during the installation, please refer to the PyAudio documentation for platform-specific instructions.
- Obtain your OpenAI API key from OpenAI Platform API Keys and set it as an environment variable:
For Linux or macOS:
export OPENAI_API_KEY="Your_API_Key"
For Windows:
setx OPENAI_API_KEY "Your_API_Key"
- Run the GUI version of the chatbot:
python voicebot_with_GUI.py
Alternatively, to run the non-GUI version, open the voicebot_without_GUI.py
file and replace "Your_API_Key"
with your actual OpenAI API key. Then, run the following command:
python voicebot_without_GUI.py
- Run
voicebot_with_GUI.py
to start the application:
python voicebot_with_GUI.py
- Enter your OpenAI API key and click "Submit".
- Click the "Speak" button and speak into your microphone to send a message to the chatbot.
- The chatbot will generate a text and voice response using the OpenAI API.
- To save the conversation to a text file, click the "Save To Text File" button and choose the save location.
- Voice-enabled interaction, providing a more natural and engaging experience
- Powered by OpenAI's advanced text-davinci-003 model
- Available in both GUI and non-GUI versions
- Easy setup and configuration
- Thanks to OpenAI for providing the text-davinci-003 API
- Special thanks to the developers of the libraries and tools used in building this chatbot