This is a Flask-based Voice Assistant application using OpenAI's GPT-3.5 Turbo for natural language processing and pygame for audio playback.
- Python 3.6 or higher
- pygame library
- OpenAI API Key
-
Clone the repository:
git clone https://github.com/MuhammadNasarUddin/voice-assistant.git
-
Install the required packages:
pip install -r requirements.txt
-
Set up your OpenAI API Key. Create a
.env
file in the project root and add:openai_api_key=your_openai_api_key
-
Run the Flask application:
python app.py
-
Open your browser and go to http://localhost:5000.
-
Choose your preferred language (English or Urdu) and click on the microphone button to start voice recognition.
-
Speak clearly and ask your question. The assistant will generate a response using GPT-3.5 Turbo.
/static
: Contains static files such as images and generated audio files./templates
: HTML templates for Flask.