MediSage is a full-stack AI-powered RAG-assisted chatbot web application built using Langchain, Flask, Pinecone API, Together API, and JavaScript Web Speech API. It allows users to have a real-time chat experience where:
- Messages are sent to a Together AI-powered LLM
- The bot replies instantly in text and voice
- You can optionally upload audio files
- Uses
pydub+ffmpegfor audio handling on the backend
- π Real-time chat interface
- π§βπ» Backend powered by Together AI API
- π Text-to-speech using Web Speech API
- π Audio upload functionality
- π Clean, animated UI with proper styling
| Layer | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Flask (Python) |
| AI Model | Together API, Mistral-7B-Instruct (LLM) |
| Audio Output | Web Speech API + PyDub |
| Environment | Conda (Python 3.9+) |
git clone https://github.com/your-username/ai-voice-chatbot.git
cd ai-voice-chatbotconda create -n chatbot-env python=3.9
conda activate chatbot-envpip install -r requirements.txtAlso install ffmpeg for pydub:
conda install -c conda-forge ffmpegTOGETHER_API_KEY=your_actual_key_here Or set it in app.py directly if you're testing.
python app.pyVisit http://localhost:5000 in your browser.
βββ app.py # Flask backend βββ templates/ β βββ chat.html # Main chat UI βββ static/ β βββ style.css # Styling β βββ scripts.js # JS: Chat, TTS, file upload βββ requirements.txt # Python deps βββ README.md # You are here
βΊοΈ Microphone input & live voice recognition
π§ Add memory/context window to LLM
ποΈ Chat history and user login
π± Mobile responsiveness
Together AI
PyDub
MDN Web Speech API