Celery task that constructs pipeline requests and runs pipelines.
Source: web/backend/tasks/pipelines.py
This module bridges the web application and the core screencastgen pipelines. It reads job configuration from the database, resolves uploaded assets, constructs typed pipeline request objects, and runs the appropriate pipeline with a Progress Reporter.
run_pipeline_task(job_id: str)Main Celery task. Dispatched by Jobs Router when a job is created.
Process:
pipeline_type.audio → run_audio_pipeline()highlight → run_highlight_pipeline()lipsync → run_lipsync_pipeline()visualization → run_visualization_pipeline()upload_output() for remote-storage backends._build_audio_request(job, pdf_path, output_dir)Builds AudioPipelineRequest from config_json and defaults.
Notable values:
remotetts_server_url falls back to settings.TTS_SERVER_URLtts_concurrency falls back to settings.TTS_CONCURRENCY_build_highlight_request(job, pdf_path, output_dir, db_session)Builds HighlightPipelineRequest and resolves voice inputs.
_resolve_highlight_voice(cfg, job, db_session)Voice resolution priority:
voice_idref_audio_file_idWhen an uploaded reference audio file is used, the task reuses stored UploadedFile.ref_text
when available. Otherwise it calls /transcribe while processing the job and caches a
successful transcript for retries or later exports. If transcription returns no text,
request construction raises a clear error and the job is marked failed.
_build_lipsync_request(job, pdf_path, output_dir, db_session)Builds LipsyncPipelineRequest, resolving:
/transcribe call for uploaded reference audiotts_concurrency_build_visualization_request(job, output_dir)Builds VisualizationPipelineRequest from VisualizationConfig. Visualization jobs do not require an uploaded document.
run_lipsync_epub_export_task(job_id: str)Re-runs a completed lip-sync job in epub mode against the existing output
directory. It reuses resumable synthesis and alignment state, writes a
text-and-narration EPUB without presenter video, uploads the result, and records
the independent epub_export_* state in config_json.
Pipeline Tasks
├── Celery App (task registration)
├── Progress Reporter (JobProgressReporter)
├── Web Config (TTS_SERVER_URL, TTS_CONCURRENCY)
├── Web Database (sync session)
├── DB Models (Job, JobStatus, UploadedFile)
├── Storage Service (paths, upload_output)
├── Voices Service (bundled voice resolution, lazy import)
├── Pipeline Types (request dataclasses)
├── Audio Pipeline (run_audio_pipeline)
├── Highlight Pipeline (run_highlight_pipeline)
├── Lipsync Pipeline (run_lipsync_pipeline)
├── Visualization Pipeline (run_visualization_pipeline)
├── Aligner (get_default_alignment_provider)
├── Reader Assets (reader asset upload names)
└── Transcribe Client (on-demand reference audio transcription)