This project is a real-time conversational chatbot with a web interface to interact with users using Cohere for responses and ElevenLabs for high-quality text-to-speech voices.

- Real-time speech-to-text conversion
- Natural language processing for understanding user queries
- Audio response generation
- WebSocket-based real-time communication
This chatbot application provides an interactive voice-enabled chat interface with the following components:
-
Frontend Interface:
- A modern, responsive web interface built with HTML, CSS, and JavaScript
- Real-time text display and message history
- Voice input with visual feedback
-
Backend Services:
Chatbot.py
: Handles chat logic, processes user input, and generates responsesRealtimeSTT_Server.py
: Processes audio streams and converts speech to text in real-time
Before setting up the project, ensure you have the following:
- Python (3.9 - 3.12)
- API Keys:
- ElevenLabs API key (for text-to-speech functionality)
- Cohere API key (for the
command-r7b-arabic-02-2025
model used for Arabic language processing)
- Dependencies:
- All required Python packages are listed in
requirements.txt
- All required Python packages are listed in
1- Clone the repository.
2- install the required libraries: pip install -r requirements.txt
.
3- Insert the Cohere and ElevenLabs API keys in Chatbot.py
. (I added a demo API keys for testing)
4- Run the real-time speech-to-text server: python RealtimeSTT_Server.py
.
5- Run the chatbot frontend: python Chatbot.py
.
6- Navigate to http://127.0.0.1:5000
to use the chatbot.