This is an example repo for creating an OpenAI ChatGPT-powered chatbot that you can talk to with your voice thanks to OpenAI's Whisper transcription model.
It's a very minimal example of a talking chatbot with a voice. 🎙 For a more complex and customizable one, you can check out 🧦 Sock.
Make sure to have your various dependencies installed.
yarn install
cd backend
python3 -m venv venv
venv\scripts\activate
pip install wheel
pip install -r requirements.txt
Create a .env
file in the backend
directory with the following contents:
OPENAI_API_KEY="put key here"
OPENAI_CHAT_MODEL="gpt-3.5-turbo-0301"
Open two terminal windows.
- In the first terminal, run the following command to start the backend:
yarn backend
- In the second terminal window, run the following command to start the frontend:
yarn frontend
Finally, open a browser and navigate to http://localhost:3000.
If you get an error like TypeError: argument of type 'NoneType' is not iterable
when you run yarn backend
, you may need to forcibly reinstall whisper. Do the following in your terminal:
cd backend
pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git
To get the chatbot to respond to you, say his name, "Data", after you've finished what you want to say.