{
  "openapi": "3.0.1",
  "info": {
    "title": "Voice Activity Detector - Speech & Silence Segments (VAD)",
    "description": "Detect speech and silence in any audio or video URL with Silero VAD running on CPU. Get timestamped speech segments, speech ratio and pauses, or download the audio with silence removed or long pauses shortened. No external APIs.",
    "version": "1.0",
    "x-build-id": "Mxpd9dKCeKPHhwu7o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~voice-activity-detector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-voice-activity-detector",
        "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/freecamp008~voice-activity-detector/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-voice-activity-detector",
        "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/freecamp008~voice-activity-detector/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-voice-activity-detector",
        "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",
        "required": [
          "mediaUrls"
        ],
        "properties": {
          "mediaUrls": {
            "title": "Audio / video URLs",
            "type": "array",
            "description": "Direct links to audio or video files (MP3, WAV, M4A, AAC, OGG, OPUS, FLAC, MP4, MOV, MKV, WEBM, ...). Each file becomes one result with its speech segments. The link must return the media file itself, not a web page with a player.",
            "items": {
              "type": "string"
            }
          },
          "audioOutput": {
            "title": "Output audio file",
            "enum": [
              "none",
              "removeSilence",
              "shortenPauses"
            ],
            "type": "string",
            "description": "<b>None</b>: only return the speech/silence timeline. <b>Remove silence</b>: save an audio file that contains only the detected speech (plus the speech padding). <b>Shorten long pauses</b>: keep everything but shorten every pause longer than <i>Max pause length</i>, for natural-sounding podcasts, voice-overs and lectures. Files are saved to the key-value store (<code>outputAudioUrl</code>).",
            "default": "none"
          },
          "maxPauseMs": {
            "title": "Max pause length (ms)",
            "minimum": 50,
            "maximum": 10000,
            "type": "integer",
            "description": "Used by <b>Shorten long pauses</b>: every silence longer than this is cut down to this length. Leading and trailing silence is cut to half of it.",
            "default": 500
          },
          "outputFormat": {
            "title": "Output audio format",
            "enum": [
              "mp3",
              "m4a",
              "opus",
              "flac",
              "wav"
            ],
            "type": "string",
            "description": "Format of the trimmed audio file. MP3/M4A 160 kbps, Opus 96 kbps, FLAC/WAV lossless. Video inputs produce an audio-only file.",
            "default": "mp3"
          },
          "threshold": {
            "title": "Speech threshold",
            "minimum": 0.05,
            "maximum": 0.99,
            "type": "number",
            "description": "Speech probability (0-1) above which a 32 ms frame counts as speech. Lower it (0.3-0.4) for quiet or noisy recordings, raise it (0.6-0.8) to ignore background voices and noise. Speech ends when the probability falls below threshold - 0.15.",
            "default": 0.5
          },
          "minSpeechDurationMs": {
            "title": "Min speech duration (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Speech bursts shorter than this are ignored (clicks, coughs, short noises).",
            "default": 250
          },
          "minSilenceDurationMs": {
            "title": "Min silence duration (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "A speech segment only ends after at least this much silence. Higher values merge words and sentences into longer segments (e.g. 500-1000 ms for sentence-level chunks).",
            "default": 100
          },
          "speechPadMs": {
            "title": "Speech padding (ms)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Extra time added before and after every speech segment so that word onsets and endings are not clipped.",
            "default": 30
          },
          "maxSpeechDurationSec": {
            "title": "Max speech segment length (s)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "Split speech segments longer than this at the best pause inside them (useful to make chunks for speech-to-text). 0 = no limit.",
            "default": 0
          },
          "includeSilences": {
            "title": "Include silence list",
            "type": "boolean",
            "description": "Add a <code>silences</code> array (all gaps between speech, including leading and trailing silence) to each result.",
            "default": true
          },
          "maxDurationMinutes": {
            "title": "Max duration per file (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Only the first N minutes of each file are analyzed (and billed). Longer files are marked <code>truncated: true</code>.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}