RAG-Powered Intelligent Chatbot with Real-Time Avatar Integration
RecroTech AI Avatar is an intelligent, RAG-powered (Retrieval-Augmented Generation) chatbot system featuring:
- � Real-time Avatar Video Streaming - Dynamic avatar states (standing, listening, thinking, talking)
- 🧠 RAG System - Context-aware responses from your knowledge base
- � Voice Support - Speech-to-Text (STT) and Text-to-Speech (TTS) with OpenAI
- ⚡ WebSocket Streaming - Low-latency real-time communication
| Feature | Description |
|---|---|
| Document Processing | Load and process Markdown files from categorized folders |
| Vector Search | Semantic similarity search using ChromaDB |
| Question-Answering | GPT-4o-mini powered contextual responses |
| Voice Interaction | Whisper STT + TTS for voice conversations |
| Avatar Animation | State-based video playback synced with AI responses |
git clone https://github.com/your-org/recrotech-avatar.git
cd recrotech-avatar# Windows
python -m venv .venv
.venv\Scripts\activate
# Linux/macOS
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root:
API_KEY=your-openai-api-key-here
⚠️ Important: A valid OpenAI API key is required for embeddings, chat, TTS, and STT functionality.
python main.pyThe server will start at http://localhost:8011
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Health check |
/ai/chat |
POST | Send text message, get AI response |
/ai/voice |
POST | Upload audio, get spoken AI response |
/avatar/state/{state} |
POST | Change avatar state |
/ws/avatar |
WebSocket | Real-time avatar video stream |
├── main.py # Application entry point
├── ai_handler.py # AI/RAG/TTS/STT logic
├── rtc_handler.py # FastAPI routes & WebSocket
├── video_handler.py # Avatar video state management
├── createRAG.ipynb # Vector database creation notebook
├── knowledge_base/ # Markdown documents (about, services, solutions)
├── vector_db/ # ChromaDB persistent storage
├── avatar_videos/ # Avatar video files
└── requirements.txt # Python dependencies
- Framework: FastAPI + Uvicorn
- AI/LLM: OpenAI GPT-4o-mini
- RAG: LangChain 0.3.x
- Vector DB: ChromaDB
- Embeddings: OpenAI text-embedding-ada-002
- Video: OpenCV
- Audio: Pydub + OpenAI TTS/Whisper
© 2024 RecroTech. All rights reserved.