🤖 Chatbot Article: link
🗣️ Voice Assistant Article: link
- Go on platform.openai.com
- Log-in
- Navigate to this url
- Create a new API Key
- Paste you API Key in the secrets.json file
- Import openai libraries
pip install openai
- Easy command line interface.
- Text generation using OpenAI's GPT-3.5 language model.
To run the script, just execute the following command:
python chatbot.py
You will be prompted to write a text and the assistant will respond with a written answer
- Python 3.6 or later
- Import openai, pyttsx3 and SpeechRecognition libraries
pip install openai
pip install pyttsx3
pip install SpeechRecognition
- Easy command line interface.
- Text generation using OpenAI's GPT-3 language model.
- Text to Audio conversion using the pyttsx3 library.
- Audio to Text conversion using Google API.
To run the script, just execute the following command:
python voiceAssistant.py
You will be prompted to speak and the assistant will respond with a written answer that is spoken out loud.
- AttributeError: Could not find PyAudio; check installation Solution on OSx (with homebrew installed):
brew install portaudio
pip install PyAudio
For more details see this thread on StackOverflow
- The quality of the speech recognition and response is dependent on the quality of the user's microphone and the OpenAI language model.
- The script is currently configured to work only with Italian language, but can be adapted for other languages (edit line 28 of voiceAssistant.py).