The ChatGPT Voice Assistant project is a simple yet powerful application that allows you to have natural language conversations with the ChatGPT language model. This GitHub repository contains the source code and instructions for building your own voice assistant, which can record audio, transcribe it to text, interact with ChatGPT, and convert responses back to speech.
The project comprises three main components:
Voice Recording Interface: An interface that allows users to start and stop audio recording using buttons. The recorded audio is saved to disk.
Speech-to-Text Conversion: Utilizes Python's speech recognition library to transcribe the recorded audio into text. This text is then displayed on the interface.
Text-to-Speech Conversion: Converts ChatGPT's responses from text to speech, making the assistant more engaging and interactive.
Before you begin, ensure you have the following tools and libraries installed:
Clone the Repository:
git clone https://github.com/yourusername/ChatGPT-Voice-Assistant.git
Install Dependencies:
Install the required Python libraries using pip:
pip install -r requirements.txt
Configure OpenAI API:
Create an OpenAI API key if you don't have one and configure it in your project. You'll need to set up environment variables for this key.
Setup Text-to-Speech Engine:
Choose a text-to-speech engine (e.g., gTTS, pyttsx3, or others) and install the required libraries. Ensure the chosen engine is correctly configured.
Run the Application:
Execute the main script to start the application:
python voice_recorder_tkinter.py
Interact with ChatGPT:
We welcome contributions to enhance this project. If you have any improvements, bug fixes, or new features to add, please submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or suggestions, feel free to contact me.
Enjoy conversing with your ChatGPT Voice Assistant!