Skip to content

itsbaraa/Chatbot

Repository files navigation

Chatbot

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.

image

Key Features

  • Real-time speech-to-text conversion
  • Natural language processing for understanding user queries
  • Audio response generation
  • WebSocket-based real-time communication

How it works

This chatbot application provides an interactive voice-enabled chat interface with the following components:

  1. 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
  2. Backend Services:

    • Chatbot.py: Handles chat logic, processes user input, and generates responses
    • RealtimeSTT_Server.py: Processes audio streams and converts speech to text in real-time

Requirements

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

Setup

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.

Showcase

chatbot.mp4

About

Web Chatbot Using Cohere and ElevenLabs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published