an.orchestrate#
Orchestrator: validate → audio → render → verify.
Phase 5 ships orchestrate(project_dir, ...) — the high-level flow that
ties together validation, audio synthesis, rendering, and verification.
The full iterative edit loop (free-text “make Maya’s laugh longer” →
re-render only the affected shot) lives in the an skill, which calls
into these primitives.
>>> from an.orchestrate import OrchestratorReport
>>> r = OrchestratorReport()
>>> r.success
True
Functions
|
Apply a free-text edit instruction. |
|
Run the full pipeline. |
|
Render the project's scene to a single mp4 under |
|
Schema + semantic validation of the scene at |
Classes
|
Outcome of an end-to-end orchestrated run. |
- class an.orchestrate.OrchestratorReport(success=True, output_path=None, validation=None, verifications=<factory>, error=None, root=None)[source]#
Bases:
objectOutcome of an end-to-end orchestrated run.
- merge_verification(vr)[source]#
Add
vr— less any finding this report already holds: the render report repeats what the pre-render validation found (a synthesized line still past its shot), and one finding is reported once (an#309). The SAME finding: severity, path, location and description (its paths made portable) — so a render that escalates a warning to an error, or locates it elsewhere, is reported.vr’s verdict is kept.- Return type:
- an.orchestrate.iterate(project_dir, instruction, **kwargs)[source]#
Apply a free-text edit instruction. Returns an IterateResult.
Thin re-export for consistency with the rest of the orchestrator surface; the real implementation lives in
an.iterate.
- an.orchestrate.orchestrate(project_dir, *, output_name='main', verifiers=None, skip_render=False, tts=None, lipsync='offline', parallel=None, language='en')[source]#
Run the full pipeline. Returns a structured outcome.
Phases:
Validate (schema + semantic). Hard fail if the schema is broken.
Pre-render verifiers (any that accept
render=None).Render (audio is auto-run inside
renderwhen needed).Post-render verifiers.
verifiersdefaults to[LayoutLintVerifier(), MediaQualityVerifier()]— the second one is whyan.verify.media.ssim’s threshold is load-bearing and must not be retuned casually. Pass an empty list to skip verification, or includeHumanInTheLoopVerifier()to prompt.skip_render=Trueruns validation + lint only.ttsandlipsyncaccept either a provider name string or a provider instance — useful for callers (e.g.muvid) that want to inject aan.audio.WordTimingsLipSyncdriven by their own alignment store, instead of lettinganre-transcribe.ttsdefaults to each voice’s own provider (an#305), asan renderdoes.- Return type:
- an.orchestrate.render_project(project_dir, **kwargs)[source]#
Render the project’s scene to a single mp4 under
output/— the orchestrator’s name foran.render.render_project(), every keyword forwarded.It used to re-declare the leaf’s parameters, and the two drifted: the CLI (
an render) passedsupersample,pix_fmt,step_hzandlanguagehere from the day each flag landed, and this wrapper refused all four with aTypeError— invisible because the CLI test stubbed THIS function rather than the leaf (an#98 review). A pass-through cannot drift.- Return type:
- an.orchestrate.validate_project(project_dir, *, fps=None, strict_assets=False)[source]#
Schema + semantic validation of the scene at
project_dir.A
scene.mdthat does not PARSE — a dialogue line in no accepted shape (an#96), a malformed YAML block — is a Finding, not a traceback:an validateexists to print findings, and it used to be the one tool that stack-dumped on the error it should report.fpsis the frame rate the render will use when it is not the scene’s (an render --fps): the checks that depend on it (step_hz, a line heard during a dissolve) use it, as the render will (an#435).What loading the scene WARNED about (a retired camera field dropped on read, a migration’s notice) is a warning finding too (an#454): a Python warning is invisible to an agent reading
an validate’s findings.strict_assets(an#456) judges the scene asan render --strict-assetswill: each stage shot is compiled the way the render compiles it, refusing stand-ins, and what it refuses is an error on that shot; the library pins are checked strictly too.- Return type: