Skip to content

Files

Latest commit

142c312 · Dec 11, 2021

History

History
48 lines (43 loc) · 1.69 KB

README.md

File metadata and controls

48 lines (43 loc) · 1.69 KB

OpenAI Conversation

A wrapper around OpenAI's davinci GPT-3 model that allows you to talk to it. Using Google Cloud's Speech-to-Text and Text-to-Speech APIs, it transcribes speech to text, passes the text to GPT-3, and then speaks the response back to you.

🚀 Get Started

1. Clone repo and install requirements

Mac

# Clone the repository:
git clone https://github.com/AlecHaring/openai-conversation
# Open the project's directory:
cd openai-conversation
# Create new virtual environment:
python3 -m venv ./venv
# Activate the virtual environment:
source ./venv/bin/activate
# Install required packages:
pip3 install -r requirements.txt

Windows

# Clone the repository:
git clone https://github.com/AlecHaring/openai-conversation
# Open the project's directory:
cd openai-conversation
# Create new virtual environment:
python -m venv .\venv
# Activate the virtual environment:
.\venv\Scripts\activate
# Install required packages:
pip3 install -r requirements.txt

2. Set up Google Cloud Information

  • Follow the instructions here to set up Speech-to-Text.
  • Follow the instructions here to set up Text-to-Speech.

3. Get OpenAI API Key

  • Go to OpenAI's website and sign up for an account.
  • Go to API keys page and copy the secret key.
    • Set the API_KEY variable in the OpenAIDriver class in src/open_ai_driver.py

4. 🔌 Run!

python3 src/main.py