{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/components/recognizer-assemblyAiOptions",
  "title": "AssemblyAI Recognizer Options",
  "description": "AssemblyAI-specific STT options. Only applies when recognizer vendor is 'assemblyai'.",
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "AssemblyAI API key. Overrides credentials configured in jambonz."
    },
    "serviceVersion": {
      "type": "string",
      "enum": ["v2", "v3"],
      "description": "AssemblyAI streaming API version."
    },
    "speechModel": {
      "type": "string",
      "description": "AssemblyAI speech model to use for recognition, e.g. 'universal-3-6-pro', 'universal-3-5-pro' or 'u3-rt-pro'."
    },
    "formatTurns": {
      "type": "boolean",
      "description": "Enable turn-level formatting."
    },
    "endOfTurnConfidenceThreshold": {
      "type": "number",
      "description": "Confidence threshold for end-of-turn detection."
    },
    "minEndOfTurnSilenceWhenConfident": {
      "type": "number",
      "description": "Minimum silence duration (milliseconds) to trigger end-of-turn when confidence is met. Default: 400."
    },
    "maxTurnSilence": {
      "type": "number",
      "description": "Maximum silence duration (milliseconds) before forcing end-of-turn. Default: 1280."
    },
    "minTurnSilence": {
      "type": "number",
      "description": "Minimum silence duration (milliseconds) before allowing end-of-turn."
    },
    "keyterms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of key terms to boost in recognition."
    },
    "prompt": {
      "type": "string",
      "description": "Prompt to guide the recognition model."
    },
    "languageDetection": {
      "type": "boolean",
      "description": "Enable automatic language detection."
    },
    "vadThreshold": {
      "type": "number",
      "description": "Voice activity detection threshold."
    },
    "inactivityTimeout": {
      "type": "number",
      "description": "Timeout (seconds) for inactivity before closing the stream."
    },
    "languageCodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Languages to bias transcription toward (e.g. ['en', 'es']); code-switching among them is still allowed. Universal-3.5 Pro and Universal-3.6 Pro only. Default: all supported languages."
    },
    "voiceFocus": {
      "type": "string",
      "enum": ["near-field", "far-field"],
      "description": "Isolate the primary voice and suppress background noise before transcription. Use 'near-field' for phones and headsets, 'far-field' for distant microphones. Default: off."
    }
  },
  "additionalProperties": false
}
