Skip to content

Latest commit

Β 

History

History
109 lines (69 loc) Β· 2.42 KB

File metadata and controls

109 lines (69 loc) Β· 2.42 KB

MediSage - AI based Voice enabled Medical Chatbot

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 + ffmpeg for audio handling on the backend

🧠 Features

  • πŸ”„ 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

πŸ—οΈ Tech Stack

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+)

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/your-username/ai-voice-chatbot.git
cd ai-voice-chatbot

2. Create Conda Environment

conda create -n chatbot-env python=3.9
conda activate chatbot-env

3. Install Dependencies

pip install -r requirements.txt

Also install ffmpeg for pydub:

conda install -c conda-forge ffmpeg

4. Set Your Together API Key

5. Create a .env file and add:

TOGETHER_API_KEY=your_actual_key_here Or set it in app.py directly if you're testing.

πŸƒ Run the App

python app.py

Visit http://localhost:5000 in your browser.

πŸ“ Project Structure

β”œβ”€β”€ 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

πŸ’‘Future Enhancements:

⏺️ Microphone input & live voice recognition

🧠 Add memory/context window to LLM

πŸ—ƒοΈ Chat history and user login

πŸ“± Mobile responsiveness

πŸ™Œ Acknowledgements:

Together AI

PyDub

MDN Web Speech API