/Talk-with-ChatGPT

Python code to voice-interact with ChatGPT.

Primary LanguagePython

Talk with ChatGPT (Voice-Interactive)

This python code let's you actually talk with ChatGPT instead of typing.

It's amazing how ChatGPT responds almost like a real human, right?
But don't you feel like typing your question and then reading it's answer greatly worsens this feeling of having a real human assistant?

Yep, me too!

Introducing: Talk with ChatGPT.
Now you can just speak to ChatGPT and listen to the answer. Like real humans do when they communicate.

What this python code does:
– Listens to your prompt (audio recording)
– Converts your voice-prompt into text (using OpenAI's Speech-To-Text)
– Sends your (now written) prompt to ChatGPT (using OpenAI's API)
– Gets an answer from ChatGPT (using OpenAI's API)
– Turns the (written) answer into speech (using OpenAI's Text-To-Speech)
– Plays the audio file

Using this, you can talk to ChatGPT in many languages. I personally tested English, German, French, Spanish and Thai. It works like a charm! For Thai it has a very american accent though xD

I find it tons of fun to use!

⚠️ Disclaimer: The voice you hear is AI generated. ChatGPT is not a real human. Consider double checking important information and don't base your decisions on answers you get from ChatGPT.
⚠️ Disclaimer: I'm a beginner programmer. I did this project because I wanted to learn how to work with an API in Python. This code was made for my own learning purposes and might be buggy. Use it at your own risk.

Versions

v0 are learning files. There I try new concepts before adding them into the main code.
v1 is me trying to understsand the OpenAI API.
v2 lets you type a prompt and get back a spoken answer.
v3 is the finished project.