{
  "openapi": "3.0.1",
  "info": {
    "title": "Speaker Diarization – Who Spoke When, Speaker Labels for Audio",
    "description": "Who spoke when in interviews, podcasts, meetings and calls. Give audio or video URLs, get speaker turns with start/end times, talk time per speaker, RTTM and SRT/VTT with speaker tags, plus an optional Whisper transcript with speaker labels. Open-source models on CPU, no API key. $0.005 per minute.",
    "version": "0.1",
    "x-build-id": "GV0ROVIPSwuQIQfYd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~speaker-diarization/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-speaker-diarization",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/gazidev~speaker-diarization/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-speaker-diarization",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/gazidev~speaker-diarization/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-speaker-diarization",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "audioUrls": {
            "title": "Audio or video URLs",
            "type": "array",
            "description": "Direct links to audio or video files: mp3, m4a, wav, ogg, opus, flac, aac, mp4, mov, webm, mkv and more. S3/CDN links, Dropbox, Google Drive ('Anyone with the link') and OneDrive share links work. **YouTube, TikTok, Instagram, Spotify, Facebook, X, Vimeo and SoundCloud page links are rejected** (their terms forbid downloading), and so are private-network addresses. Only submit recordings you have the right to process. The demo: a one-narrator LibriVox reading and a public-domain two-person phone call (President Clinton and astronaut Shannon Lucid, 1996).",
            "default": [
              "https://archive.org/download/spc141_1503_librivox/spc141_spiderandfly_lcw_64kb.mp3",
              "https://upload.wikimedia.org/wikipedia/commons/7/77/Audio_Recording_of_President_Clinton%27s_Remarks_in_a_Telephone_Conversation_with_Astronaut_Shannon_Lucid_-_DPLA_-_e526320f91c66d774cde564cf1fb2dc1.mp3"
            ],
            "items": {
              "type": "string"
            }
          },
          "numSpeakers": {
            "title": "Number of speakers (0 = detect automatically)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "If you know how many people talk (e.g. 2 for an interview), set it: this is the single biggest accuracy gain. 0 = estimate the count per file.",
            "default": 0
          },
          "minSpeakers": {
            "title": "Minimum speakers (auto mode)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Lower bound for the automatic count. Ignored when 'Number of speakers' is set.",
            "default": 1
          },
          "maxSpeakers": {
            "title": "Maximum speakers (auto mode)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Upper bound for the automatic count. Ignored when 'Number of speakers' is set.",
            "default": 10
          },
          "withTranscript": {
            "title": "Add a Whisper transcript with speaker labels",
            "type": "boolean",
            "description": "Also transcribe the speech (Whisper base, 99 languages) and label every line with its speaker. Charged as an extra event per minute (see Pricing). Off = speaker timeline only.",
            "default": false
          },
          "language": {
            "title": "Transcript language",
            "type": "string",
            "description": "Only used with the transcript. 'auto' detects it; or a code such as en, es, de, fr, pt, it, nl, tr, ru, ja, zh, ar, hi.",
            "default": "auto"
          },
          "outputFormats": {
            "title": "Files to save",
            "type": "array",
            "description": "Saved to the run's key-value store; each row links to them. The dataset row always holds the turns, the RTTM and the SRT text.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "rttm",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "JSON (full result)",
                "RTTM (speaker turns, NIST format)",
                "SRT subtitles with speaker tags",
                "WebVTT with <v> speaker voices"
              ]
            },
            "default": [
              "rttm",
              "srt"
            ]
          },
          "maxDurationMinutes": {
            "title": "Max duration per file (minutes)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Longer files are processed up to this point (and billed only for it). Use 4 GB memory for files over about 1 hour.",
            "default": 120
          },
          "maxFileSizeMB": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Larger downloads are refused (free error row).",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Per file.",
            "default": 900
          },
          "uploadedFiles": {
            "title": "Upload audio/video from your computer",
            "type": "array",
            "description": "This Actor runs with limited permissions, so ALSO select the store you uploaded into in 'Key-value store with your uploads'. When you upload files, the pre-filled demo URLs are ignored."
          },
          "uploadStore": {
            "title": "Key-value store with your uploads",
            "type": "string",
            "description": "Grants this run read access to that store only. If 'uploadedFiles' points into it, only those files are processed; otherwise every media file in the store is (up to 1,000)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}