DebateLearning is a local learning-podcast generator. It takes uploaded lecture slides or PDFs, extracts the core knowledge with a local Ollama model, turns that knowledge into a structured debate-style transcript, and then generates spoken audio with F5-TTS.
backend/- FastAPI + SQLite backend on port8100website/- Next.js frontend on port3100voices/- local reference voices used by the audio pipeline
The frontend proxies /api/* requests to the FastAPI backend through website/next.config.mjs.
DebateLearning uses a multi-stage AI pipeline: multimodal slide extraction, batch knowledge synthesis, semantic retrieval with pgvector, transcript validation, and multi-speaker TTS generation.
flowchart TD
A[Upload PDF or PPTX] --> B[Create job record]
B --> C{File type}
C -->|PPTX| D[Convert to PDF with LibreOffice]
C -->|PDF| E[Skip conversion]
D --> F[Render each page and extract text]
E --> F
F --> G[Slide-level knowledge extraction]
G --> H[Batch-level knowledge creation]
H --> I[Merge into one knowledge document]
I --> J[Search related prior knowledge with pgvector]
J --> K[Generate draft debate transcript]
K --> L[Check transcript against source knowledge]
L --> M[Polish transcript for spoken delivery]
M --> N[Generate voice clips with F5-TTS]
N --> O[Combine clips into final audio]
O --> P[Clean temporary clips]
I --> Q[Save knowledge.txt]
M --> R[Save transcript.json]
O --> S[Save output.wav]
I --> T[Index knowledge chunks in pgvector]
High-level artifact flow:
PDF/PPTX source
-> extracted slide and batch knowledge
-> merged knowledge document
-> related prior knowledge retrieval
-> checked and polished transcript
-> generated audio episode
Each job stores artifacts under:
backend/outputs/<job_id>/
knowledge.txt
transcript.json
output.wav
Run from Anaconda Prompt if the F5-TTS environment only works there:
conda activate f5-tts
cd /d C:\Users\pojwm\repos\f5-tts-sandbox\backend
python -m uvicorn main:app --reload --port 8100Required local services/tools:
- Ollama running at
http://localhost:11434 - Ollama model
qwen3.5:4b - LibreOffice installed for PPTX conversion
- F5-TTS available in the active Python environment
If PPTX conversion fails, confirm this exists:
C:\Program Files\LibreOffice\program\soffice.exe
PDF uploads skip the LibreOffice conversion step.
cd /d C:\Users\pojwm\repos\f5-tts-sandbox\website
npm run devOpen:
http://localhost:3100
The job detail page polls the backend while processing and exposes links for:
- knowledge extraction output
- transcript JSON
- generated audio
POST /api/jobs
GET /api/jobs
GET /api/jobs/{job_id}
GET /api/jobs/{job_id}/knowledge
GET /api/jobs/{job_id}/transcript
GET /api/jobs/{job_id}/audio