Skip to content

AlecHaring/openai-conversation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Text-to-Speech wrapper around GPT-3's Davinci model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages