This repository contains a chatbot application that allows users to interact with the chatbot using speech input and output. The chatbot is powered by the Llama language model, providing intelligent responses to user queries.
- Speech recognition: Convert user's speech into text input for the chatbot.
- Text-to-speech: Generate speech output for the chatbot's responses.
- Real-time chat history: Display conversation history between the user and the chatbot.
- Graphical user interface (GUI): Intuitive interface for interacting with the chatbot.
- Multithreading: Simultaneous speech recognition and text-to-speech functionality.
-
Clone the repository:
git clone https://github.com/yousifj129/Chatbot-with-Voice.git
-
Navigate to the project directory:
cd Chatbot with Voice
-
Install the required dependencies:
pip install -r requirements.txt
-
(Optional) Model Selection:
- By default, the chatbot uses the Llama language model provided in the repository. If you want to change the model, follow the steps below:
- Download the desired Llama model in the
.gguf
format. - Replace the existing model file (
llama-2-7b-chat.Q4_K_M.gguf
) and place your own model with the path of your downloaded model.
- Download the desired Llama model in the
- By default, the chatbot uses the Llama language model provided in the repository. If you want to change the model, follow the steps below:
-
Run the
chatbot_with_voice.py
script:python main.py
-
Graphical User Interface (GUI):
- The chatbot application window will appear.
- Enter text input in the chatbox or click the "Listen" button to provide voice input.
- The chatbot will generate responses based on the input and display them in the chat history.
- Scroll the chat history to view the conversation.
-
Exiting the Application:
- Close the chatbot window.
- The speech recognition and text-to-speech engines will be stopped automatically. Note: the application doesnt close sometimes when the windows is closed, check your task manager and see the ram usage.
Feel free to customize the chatbot application to suit your needs. Some possible enhancements include:
- Modifying the GUI design and layout.
- Adding additional features or functionalities.
- Integrating with other APIs or services.
- Implementing different speech recognition or text-to-speech engines.