Audiobook Studio 2.0 docs

Priority Policies

When the gateway and the app both want the engine, a priority policy decides who goes first.

At a glance
  • TTS_API_PRIORITY sets the mode.
  • Modes: studio_first, equal, api_first.
  • Designed to avoid starvation.

The modes

ModeBehavior
studio_firstStudio's own jobs take precedence over API jobs.
equalAPI and Studio jobs share the queue fairly.
api_firstAPI jobs take precedence (for backend-style use).

Avoiding starvation

Whichever mode you pick, scheduling avoids starving the other side. Set the mode via the TTS_API_PRIORITY environment variable. See Environment Variables.