How nvidia-ai-blueprints/pdf-to-podcast works
Project type and purpose
• This is a full-stack, microservice-based application (“PDF to Podcast”) that ingests PDFs, runs them through an LLM-driven agent to produce a transcript, and finally converts that transcript to speech.
• The README confirms it’s an NVIDIA AI Blueprint built on NIM microservices (LLM inference), Docling (PDF extraction), ElevenLabs (TTS), Redis, and MinIO.
File structure
• Top-level:
• frontend/ – CLI/demo code and shared Python SDK for talking to services
• services/ – four independent microservices, each in its own subfolder with Dockerfile
– APIService
– AgentService
– PDFService (with an embedded Docling “PDFModelService”)
– TTSService
• shared/ – common libraries replicated for services to share types, storage, connection logic
• workbench/ – Jupyter notebooks & compose for exploratory development
• configs: docker-compose.yaml, Makefile, CI workflows, tests, requirements.txt
• Patterns: API gateway → domain services → external engines; each service uses shared types and connection modules to communicate (HTTP + Redis).
Key architecture insights from the README
• Four microservices spin up via Docker Compose.
• Underlying 3 LLMs (via NIM endpoints) form an ensemble.
• Docling runs as a sub-service in PDFService (two Docker images: API + worker).
• Storage: MinIO for file artifacts, Redis for job queue/tracking.
• Tracing via Jaeger (optional).
a. Main layers (from top to bottom):
• Presentation Layer
• API Layer
• Domain (Orchestration) Layer
• Core Service Layer
• Infrastructure & External Dependencies Layer
b. Components per layer:
Presentation Layer (Layer 1)
– frontend/__main__.py CLI or demo UI
– workbench notebooks (optional interaction)
API Layer (Layer 2)
– APIService (FastAPI)
• Exposes Swagger at :8002
• Routes incoming jobs to the AgentService or PDFService
Domain (Orchestration) Layer (Layer 3)
– AgentService
• Coordinates transcript generation flows (uses shared API types, llmmanager)
– PDFService
• PDF ingestion & extraction sub-service (“PDFModelService”)
– TTSService
• Converts transcript text to audio via ElevenLabs
– Shared libraries (shared/shared & frontend/shared) supply common code for connection, job tracking, types
Core Service Layer (Layer 4)
– Docling (PDF extraction engine)
– NVIDIA NIM LLM endpoints (meta/llama-3.1 variants)
– ElevenLabs TTS API
Infrastructure & External Dependencies (Layer 5)
– Redis (job queue, rate limiting)
– MinIO (object storage for PDF, extracted text, audio artifacts)
– Docker Compose orchestration
– Jaeger (tracing)
1. Presentation → APIService (HTTP)
2. APIService → PDFService (HTTP) for ingestion, or → AgentService to start transcript
3. AgentService ↔ Core LLM endpoints (NIM) (HTTP/gRPC)
4. AgentService → Redis to enqueue/poll job status; → MinIO to fetch context PDFs
5. AgentService → TTSService (HTTP) passing transcript
6. TTSService ↔ ElevenLabs (HTTP) → generates audio → stores in MinIO
7. Presentation pulls final audio URL from MinIO via APIService
d. Architectural patterns & design principles:
• Microservice decomposition by business capability (PDF, Agent, TTS, API gateway)
• Shared library for type safety and DRY (in shared/ and frontend/shared/)
• Layered separation of concerns (UI vs routing vs orchestration vs engines vs infra)
• Polyglot persistence: Redis for transient state, MinIO for object storage
• Containerized deployment with Compose for dev/quickstart
e. Technologies & frameworks callouts:
• FastAPI (APIService, other services)
• Docker & Docker Compose
• Python (uv, ruff, pytest)
• NVIDIA NIM for inference
• Docling for PDF extraction
• ElevenLabs TTS
• Redis, MinIO, Jaeger