Logo Lanfrica

Musagen12/fully_featured_chatbot

Domain:

natural language processing

Record type:

software
Creator:
Mus
Host:
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 …