AI Debate Arena is a full-stack application where users can engage in real-time structured debates—either Human vs Human or Human vs AI. It leverages speech-to-text, LLM and NLP-based evaluation, and a point-based scoring system to judge arguments and declare winners.
- Real-time speech and text input
- Two debate modes: Human vs Human and Human vs AI
- Argument evaluation using LLMs (via Groq API with Llama 3 8b)
- Speech-to-Text Transcription using Whisper API
- Debate scoring, winner declaration, and leaderboard
- Debate history and user stats
- Full-stack: FastAPI backend + React frontend + PostgreSQL DB
- Frontend: React.js, HTML/CSS
- Backend: FastAPI, Python
- Database: PostgreSQL with SQLAlchemy & Alembic
- AI Tools: Groq API (LLM), Whisper API (ASR)
- Python 3.10+
- Node.js + npm
- PostgreSQL
- Groq & Whisper API keys
cd backend
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
alembic upgrade head
uvicorn backend.app.main:app --reloadcd frontend
npm install
npm run devCreate a .env file in the backend directory with the following:
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/debates
GROQ_API_KEY=your_groq_api_key
WHISPER_API_KEY=your_whisper_api_keyalembic revision --autogenerate -m "Your message"
alembic upgrade headMain endpoints (see full schema in FastAPI docs):
POST /debates/– Start a new debatePOST /arguments/– Submit a new argumentGET /leaderboard/– View current rankingsGET /debates/{id}– Get full debate history



