IVASTbot-GPT is a voice-based chatbot that uses speech-to-text (STT) and text-to-speech (TTS) technologies to interact with users. It leverages the OpenAI GPT-3.5 model for generating responses and supports Vietnamese language.
- Record audio and convert it to text using the PhoWhisper model.
- Generate responses using the OpenAI GPT-3.5 model.
- Convert text responses to speech using the gTTS library.
- Supports Vietnamese language.
-
Clone the repository:
git clone https://github.com/ngoManhDUY/IVASTbot-GPT.git cd IVASTbot-GPT
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the main script:
python main.py
-
Follow the prompts to interact with the chatbot:
- Speak your question into the microphone.
- The chatbot will transcribe your question, generate a response, and speak the response back to you.
-
To stop the chatbot, say "Chào tạm biệt".
main.py
: Main script for recording audio, transcribing it, generating responses, and converting responses to speech.chat_gpt.py
: Script for interacting with the OpenAI GPT-3.5 model.requirements.txt
: List of required Python packages.
This project is licensed under the MIT License. See the LICENSE file for details.
- OpenAI for the GPT-3.5 model.
- gTTS for the text-to-speech functionality.
- PhoWhisper for the speech-to-text model.
- Hugging Face Transformers for the ASR pipeline.
- Noisereduce for noise reduction.
- Librosa for additional audio processing.