{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-speaker-schema.json",
  "title": "Speaker",
  "description": "Speaker response model.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-podcast-api-openapi.yml#/components/schemas/Speaker",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 50,
      "minLength": 1,
      "title": "Name",
      "description": "Display name for the speaker"
    },
    "role": {
      "$ref": "#/$defs/SpeakerRole",
      "description": "Speaker role: Host, Expert, Guest, or Narrator"
    },
    "voice_type": {
      "$ref": "#/$defs/app__schemas__podcast__VoiceType",
      "description": "Voice type: preset, cloned, or standard",
      "default": "preset"
    },
    "voice_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Voice Id",
      "description": "Legacy voice identifier (preset name or reference URL)"
    },
    "voice_ref_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Voice Ref Id",
      "description": "In-house Voice catalog id for the audiobook TTS path"
    },
    "language": {
      "type": "string",
      "title": "Language",
      "description": "Language code (e.g., en, zh, ja)",
      "default": "en"
    },
    "use_turbo": {
      "type": "boolean",
      "title": "Use Turbo",
      "description": "Use our fast English voice engine (faster, supports paralinguistic tags like [laugh], [cough])",
      "default": false
    },
    "backstory": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Backstory",
      "description": "Speaker backstory/expertise"
    },
    "personality": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Personality",
      "description": "Speaker personality/voice"
    },
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Unique speaker ID"
    }
  },
  "type": "object",
  "required": [
    "name",
    "role",
    "id"
  ],
  "$defs": {
    "SpeakerRole": {
      "type": "string",
      "enum": [
        "Host",
        "Expert",
        "Guest",
        "Narrator"
      ],
      "title": "SpeakerRole",
      "description": "Role of a speaker in the podcast."
    },
    "app__schemas__podcast__VoiceType": {
      "type": "string",
      "enum": [
        "preset",
        "cloned",
        "standard"
      ],
      "title": "VoiceType",
      "description": "Type of voice for TTS."
    }
  }
}