File size: 693 Bytes
343eed9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Engine Control API

## Endpoint
```
POST /api/engine/control
```

### Payload
```json
{
  "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.