{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://c-app.uk/schemas/capp.local-speech-request.v1.schema.json",
  "title": "Bounded native local speech synthesis request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "op",
    "requestId",
    "text",
    "voice",
    "speed"
  ],
  "properties": {
    "op": {
      "const": "synthesize"
    },
    "requestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_.:-]+$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 240
    },
    "voice": {
      "enum": [
        "bm_george",
        "bf_emma",
        "af_heart",
        "af_sarah",
        "am_michael"
      ]
    },
    "speed": {
      "type": "number",
      "minimum": 0.75,
      "maximum": 1.25
    }
  }
}
