This is an small app based on ChatGPT and deployed with Streamlit. The repo also include a version to run directly from console.
- Receives input audio through the microphone
- Transcribe (or translate if necessary) with Wishper API
- Send it to OPENAI ChatGPT API
- Use Google Text-to-Speech API to read ChatGPT response out loud
-
Start by cloning the repository:
git clone https://github.com/PabloCanovas/chatgpt-whisper-streamlit-voice-assistant gpt_voice_assistant -
If you don't have
pipenvinstalled to manage dependencies, then go ahead:pip install pipenv --user -
Install required libraries. You can install them just by going to the cloned directory:
cd gpt_voice_assistantand by running:pipenv installwhich will install dependencies based on my Pipfile.lock. It can take a while. -
With all libraries installed, we need to manually introduce our own OpenAI api key. You need to create a new file called
myapikeys.pywith this line inside:OPENAI_KEY = "my-apikey-goes-here" -
With all the set up ready, simply run the bot typing
python chatbot.py -
You also can run it on the browser making use of the
streamlitlibrary. Runstreamlit run chatbot_streamlit.py
- Press Enter to start and stop recording.
- Don't forget to reflect on the times we are living on. What a time to be alive!
