This is a chatbot that allows you to query given pdfs either in English(With voice support) or kiswahili.
# π€ Fully Featured Chatbot
> π A multilingual, voice-enabled PDF chatbot β query your documents in **English** or **Kiswahili** with real-time, streamed AI responses.
---
## β¨ Features
| | Feature | Description |
|---|---------|-------------|
| π | **PDF Q&A** | Upload and query any PDF document using natural language |
| π | **Multilingual** | Full support for English and Kiswahili |
| ποΈ | **Voice Input** | Speak your queries in English via the microphone |
| π | **Text-to-Speech** | Hear responses read aloud |
| β‘ | **Real-time Streaming** | Token-by-token WebSocket responses for low latency |
| π§ | **RAG Architecture** | Answers are grounded in your document, not hallucinated |
| π¬ | **Feedback System** | Built-in feedback page to rate responses |
---
## ποΈ Project Structure
```
π¦ fully_featured_chatbot/
βββ π src/
β βββ π english_governance_chatbot/ # π¬π§ English PDF Q&A module
β βββ π kiswahili/ # π°πͺ Kiswahili language module
β βββ π __init__.py
β βββ π index.html # Main English chat interface
β βββ π kiswahili.html # Kiswahili chat interface
β βββ π feedback.html # User feedback page
β βββ π query_llm.py # RAG pipeline & LLM query logic
β βββ π speech_recognition.py # ποΈ Speech-to-text processing
β βββ π text_to_speech.py # π Text-to-speech output
βββ π llm_response_websocket.py # β‘ WebSocket server β LLM responses
βββ π speech_recognition_websocket.py # ποΈ WebSocket server β speech input
βββ π requirements.txt
βββ π README.md
```
---
## π Getting Started
### π§° Prerequisites
- π Python 3.8+
- π¦ pip
### βοΈ Installation
**1οΈβ£ Clone the repository**
```bash
git clone
github.com
cd fully_featured_chatbot
```
**2οΈβ£ Install dependencies**
```bash
pip install -r requirements.txt
```
### βΆοΈ Running the App
π§ Start the LLM response WebSocket server:
```bash
python llm_respons β¦