darkmedia-x-api / docs /engine_control.md
cybermedia's picture
Upload folder using huggingface_hub
343eed9 verified

A newer version of the Gradio SDK is available: 6.15.0

Upgrade

Engine Control API

Endpoint

POST /api/engine/control

Payload

{
  "narration_enabled": true,
  "bg_enabled": true
}
  • narration_enabled – When false, /api/tts/preview returns an empty URL, skipping TTS generation.
  • bg_enabled – When true, generated narration is mixed with a background‑music file (first file found in Assets/background_music).

Persistence

The flags are stored in engine_control_flags.json at the project root, allowing the state to survive server restarts.

UI Integration

  • The Narration and Music checkboxes call this endpoint on change.
  • The dashboard reads the flags on load to initialise the UI state.