Audiobook Studio 2.0 docs

Engine Contract & Hooks

An engine implements a small, published contract: five required methods, two optional.

At a glance
  • info / check_env / check_request / synthesize / settings_schema.
  • Optional: preview, shutdown.
  • Same contract for built-in and community engines.

The five required methods

def info(self): ...            # metadata for the registry
def check_env(self): ...       # can this engine run here?
def check_request(self, r): ...# pre-flight validation
def synthesize(self, r): ...   # write audio to r['output_path']
def settings_schema(self): ... # JSON Schema for the settings UI

Optional overrides

  • preview(r): lightweight preview (defaults to synthesize).
  • shutdown(): cleanup on unload (defaults to no-op).

Rules

Engines run in the TTS Server, not the app. Don't import app modules, start background threads, or write outside the plugin folder and the requested output path. Voice-asset building goes through the same contract.