Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Python implementation of ChatGPT that allows users to talk to it and it will talk back, much like J.A.R.V.I.S from Iron Man.

Notifications You must be signed in to change notification settings

legojesus/chatgpt-jarvis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J.A.R.V.I.S AI in Python (ChatGPT)

This python code allows the user to talk to ChatGPT and hear ChatGPT talk back! Just like JARVIS from Iron Man ;)

The flow is simple: User talks -> speech2text -> ChatGPT -> text2speech -> User.

Libraries used:

  • openAI's python library for ChatGPT completion
  • SpeechRecognition library for speech2text abilities via Google.
  • pyttsx3 for text2speech abilities.

How to run:

  1. Install the required libraries in the "requirements.txt" file (pip install -r requirements.txt).
  2. Get an API key from OpenAI (signup required): https://platform.openai.com/account/api-keys
  3. Create a new file called .env where the "main.py" file is, and add the following line to it: API_KEY=xxxxxxxxxxxxxxx. Replace the "xxxxxxxx" with the API key from OpenAI.
  4. Run "main.py".

Troubleshooting:

This code was built and tested on Windows 10 with Python 3.10. It will have different requirements on Mac/Linux due to different sound card/microphone setups. If trying this on Mac/Linux, you'll have to add python libraries that support your sound card/microphone.

If you're getting errors from OpenAI that the server is overloaded or query timed out - you've made too many queries too fast, or they are actualy overloaded at the moment. You can either upgrade your OpenAI account to premium, or wait a while and try again.

About

A Python implementation of ChatGPT that allows users to talk to it and it will talk back, much like J.A.R.V.I.S from Iron Man.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages