juhi.studio / projects / LectureTeX

LectureTeX

LectureTeX is a web app that converts lecture audio or video into a structured, compile-ready LaTeX PDF of study notes — transcribing speech with faster-whisper (large-v3) on an A100, turning the transcript into focused notes with your choice of LLM, and compiling clean LaTeX automatically, repairing its own errors when a compile fails.

Live demo ↗  ·  Source ↗  ·  Last updated 2026-07-30

What it is

It produces focused notes instead of a raw transcript dump: roughly 8–12 pages per ~50-minute lecture at standard depth (configurable to 5–8 or 12–18). It runs as a web app at lecturetex.juhi.studio — record or upload a lecture and it returns a compiled PDF, no local setup required.

How it works

LectureTeX runs a staged pipeline from audio to compiled PDF:

  1. Transcription — faster-whisper (large-v3) transcribes the lecture audio on a Modal A100 GPU, running in roughly 30–45 seconds versus 4–8 minutes on a laptop; low-confidence segments are dropped.
  2. Note generation — a single subject-aware LLM call turns the transcript into structured notes, keeping definitions, theorems, and worked examples while compressing filler. You pick the model — Claude (Haiku/Sonnet) or one of several NVIDIA NIM models (Llama 3.3 70B, DeepSeek-R1, Qwen3-Coder, and more).
  3. Structured rendering — the notes are wrapped in a preamble with a tcolorbox callout system and TikZ/pgfplots for visually structured, exam-ready output.
  4. Compile with automated repair — pdflatex runs inside the Modal container (full TeX Live); if a compile fails, the errors are parsed with source context and sent to a code model to fix, up to three passes with two repair rounds, returning the best PDF.

Technical stack

Transcriptionfaster-whisper (large-v3) on Modal A100 GPUs
Note generationChoice of 10 models — Claude (Haiku/Sonnet) or NVIDIA NIM (Llama, DeepSeek, Qwen, Nemotron…)
Document generationLaTeX with tcolorbox callouts and TikZ/pgfplots
Compilationpdflatex in a Modal container (full TeX Live), with an LLM error-repair loop
Media handlingffmpeg (compression), aria2c (link downloads)
InterfaceWeb app (React + Vite)
OrchestrationVercel proxy → FastAPI job server on a DigitalOcean droplet → Modal A100

Results & validation

Output depth is configurable: standard 8–12 pages, concise 5–8 pages, or detailed 12–18 pages per ~50-minute lecture — versus 40+ pages under uniform compression. An automated compile-repair loop (up to three pdflatex passes with two LLM repair rounds) returns a finished PDF without manual LaTeX fixing. TODO(juhi): add a measured compile-success rate or transcription-accuracy figure if you want to cite one.

Limitations

Everything runs server-side through the web app, so there is no local LaTeX install to manage. Transcription quality still depends on audio clarity, and highly non-standard notation or heavy cross-talk can require review.

Frequently asked questions

What is LectureTeX?

A web app that converts lecture audio or video into structured, compile-ready LaTeX PDF study notes. It transcribes with faster-whisper on an A100, turns the transcript into focused notes with your chosen LLM, and produces LaTeX that compiles automatically — repairing its own errors when needed.

How does LectureTeX turn a lecture into LaTeX notes?

It transcribes the audio with faster-whisper (large-v3) on a Modal A100, uses your chosen model to turn the transcript into structured notes that keep the important content, renders them with tcolorbox callouts and TikZ, then compiles with pdflatex — automatically repairing LaTeX errors with a code model if the first compile fails.

How long are the notes LectureTeX produces?

Roughly 8–12 pages per 50-minute lecture at standard depth, configurable to 5–8 pages (concise) or 12–18 pages (detailed), instead of a 40+ page uniform transcript.