Skip to content

An OpenAI GPT-3 AI chatbot frontend with speech-to-text and text-to-speech written in Python

Notifications You must be signed in to change notification settings

BartAgterbosch/Freya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 

Repository files navigation

Freya

A chatbot with speech-to-text and text-to-speech and language-detect written in Python which lets your interact with OpenAI's GTP-3 AI



Requirements when building from scratch

openai
gtts
speech_recognition
googletrans==4.0.0rc1
playsound==1.2.2

Setup

Create an account on beta.openai.com, and copy the API key under "View API keys", "secret key".
Create the freya_key.dat file in the same location as the executable, or just run Freya.exe once and it will create the file for you.
Paste that key into the freya_key.dat file which should be located in the same location as the Freya.exe file, and save it.
If that file does not exist and/or cannot be found, it will be created for you, after which you need to enter the key into the file.

When installing googletrans and playsound, make sure to use the exact versions as listed in the requirements, as the newer versions seem somewhat broken.

After listening for user input, Freya will parse that to text, and will query openai, the bot will detect whatever language the reponse of the AI is, and convert that to speech.

To exit the program, simply ctrl+c out of the program, or close the console window.

Download

Release: Download V3.0.0
Note: You need to get your own api key from beta.openai.com, if you want you can train your own model, but it works fairly good out of the box as the davinci engine by itself has very good interactional abilities, it is also capable of context.