This app is a game designed for your entertainment! Choose the figure you want to talk to, say or ask whatever you want, and hear the figure answering you! The game is integrated with AI, so all the responses are generated by ChatGPT and your voice is being transcribed using Whisper model by openai.
This is a Python project that enables users to interact with AI using speech-to-text and text-to-speech technologies.
- Clone the repo
git clone https://github.com/NaomiKriger/speech_to_speech_magician.git
pip install -r requirements.txt
- Set up your environment variables:
- Get your Openai API key (check out Openai website to learn more)
- Create a
.env
file in the project directory. - Add your OpenAI API key to the .env file:
OPENAI_API_KEY=your_api_key_here
- Run the server
python main.py
Once the server is running, you will hear the app "talking",
offering you the option to choose the figure you want to interact with
and to begin chatting with your chosen figure.
To speak aloud, press and hold an arrow key on the keyboard while talking.
Once you finish speaking (and release the key), your recording will be transcribed
by Whisper
, and the transcription will be sent to ChatGPT
for a response.
The response will be read aloud via a text-to-speech library, and you'll hear it.
- Python
- Openai
- ChatGPT API
- Whisper - speech-to-text
- pyttsx3 library for text-to-speech
This project is licensed under the MIT License - see the LICENSE file for details