{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/callbacks/verb-status",
  "title": "Verb Status Event",
  "description": "Real-time verb lifecycle events sent over WebSocket when notifyEvents is enabled on the session. These are informational — no response is expected.",
  "type": "object",
  "properties": {
    "event": {
      "type": "string",
      "enum": [
        "starting",
        "finished",
        "start-playback",
        "stop-playback",
        "kill-playback",
        "dtmf-bargein-detected",
        "speech-bargein-detected",
        "synthesized-audio"
      ],
      "description": "The verb lifecycle event."
    },
    "verb": {
      "type": "string",
      "description": "The verb name (e.g. 'say', 'play', 'gather'). Present on synthesized-audio, start-playback, stop-playback, kill-playback, and dtmf/speech-bargein events."
    },
    "name": {
      "type": "string",
      "description": "The verb name. Present on 'starting' and 'finished' events (these use 'name' instead of 'verb')."
    },
    "id": {
      "type": "string",
      "description": "The verb instance id, if one was assigned by the application."
    },
    "vendor": {
      "type": "string",
      "description": "TTS vendor name. Present on synthesized-audio events."
    },
    "language": {
      "type": "string",
      "description": "TTS language code. Present on synthesized-audio events."
    },
    "characters": {
      "type": "integer",
      "description": "Number of characters synthesized. Present on synthesized-audio events when not served from cache."
    },
    "elapsed_time": {
      "type": "number",
      "description": "TTS round-trip time in milliseconds. Present on synthesized-audio events when not served from cache."
    },
    "served_from_cache": {
      "type": "boolean",
      "description": "Whether the TTS audio was served from cache. Present on synthesized-audio events."
    }
  },
  "required": ["event"],
  "additionalProperties": true
}
