Skip to content
speechinfraConsole

Silero · VAD

Silero VAD

Detects speech regions in audio for trimming, segmentation and preprocessing.

silero-vad
$0.005 / audio minuteTry in Console

Current model-specific price from our catalog. Requests require your project API key and sufficient balance. Availability is checked at execution time.

Input and capabilities

Upload a short audio or video file using multipart/form-data: at most 30 seconds and 20 MiB. Use WAV for the examples below. Container compatibility depends on the model.

  • realtime input
  • streaming output
  • endpointing
  • vad

Automatic language detection: not supported.

No language-specific selection is declared for this model.

API endpoint

POST https://api.speechinfra.com/v1/inference/silero-vad

Authenticate with your Speechinfra project key. Read the quickstart and billing guide.

cURL
curl --fail-with-body "https://api.speechinfra.com/v1/inference/silero-vad" \
  -H "Authorization: Bearer $SPEECH_API_KEY" \
  -F "file=@clip.wav" \
  --form-string "threshold=0.5" \
  --form-string "min_speech_duration_ms=250" \
  --form-string "min_silence_duration_ms=100" \
  --form-string "speech_pad_ms=30"
Python
# pip install httpx
import os
import httpx

headers = {"Authorization": "Bearer " + os.environ["SPEECH_API_KEY"]}
with open("clip.wav", "rb") as audio:
    response = httpx.post(
        "https://api.speechinfra.com/v1/inference/silero-vad",
        headers=headers, files={"file": ("clip.wav", audio, "audio/wav")},
        data={
    "threshold": "0.5",
    "min_speech_duration_ms": "250",
    "min_silence_duration_ms": "100",
    "speech_pad_ms": "30"
}, timeout=90,
    )
response.raise_for_status()
print(response.json())
Node.js / fetch
// Node.js 22+, no SDK required.
import { readFile } from 'node:fs/promises';
const form = new FormData();
form.set('file', new Blob([await readFile('clip.wav')]), 'clip.wav');
for (const [key, value] of Object.entries({
  "threshold": "0.5",
  "min_speech_duration_ms": "250",
  "min_silence_duration_ms": "100",
  "speech_pad_ms": "30"
})) form.set(key, value);
const response = await fetch("https://api.speechinfra.com/v1/inference/silero-vad", {
  method: 'POST', body: form, signal: AbortSignal.timeout(90000),
  headers: { Authorization: 'Bearer ' + process.env.SPEECH_API_KEY },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Request parameters

Generated from the API schema for this deployment. Conditional parameters apply only when their controlling setting is enabled.

ParameterTypeDetails
file

Required

string

Short audio or video file. Direct API limit: 30 seconds, 20 MiB.

thresholdnumber

default: 0.5 · min: 0 · max: 1

min_speech_duration_msinteger

default: 250 · min: 32 · max: 10000

min_silence_duration_msinteger

default: 100 · min: 32 · max: 10000

speech_pad_msinteger

default: 30 · min: 0 · max: 2000

Complete request schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "Short audio or video file. Direct API limit: 30 seconds, 20 MiB."
    },
    "threshold": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 0.5
    },
    "min_speech_duration_ms": {
      "type": "integer",
      "minimum": 32,
      "maximum": 10000,
      "default": 250
    },
    "min_silence_duration_ms": {
      "type": "integer",
      "minimum": 32,
      "maximum": 10000,
      "default": 100
    },
    "speech_pad_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2000,
      "default": 30
    }
  }
}

Response schema

The schema below describes the response; optional fields depend on model settings.

View complete response schema
{
  "$defs": {
    "VadRange": {
      "properties": {
        "start": {
          "title": "Start",
          "type": "number"
        },
        "end": {
          "title": "End",
          "type": "number"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "title": "VadRange",
      "type": "object"
    }
  },
  "properties": {
    "speech": {
      "items": {
        "$ref": "#/$defs/VadRange"
      },
      "title": "Speech",
      "type": "array"
    },
    "duration": {
      "title": "Duration",
      "type": "number"
    },
    "model": {
      "default": "silero-vad",
      "title": "Model",
      "type": "string"
    },
    "cpu_seconds": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Cpu Seconds"
    },
    "threshold": {
      "default": 0.5,
      "title": "Threshold",
      "type": "number"
    }
  },
  "required": [
    "speech",
    "duration"
  ],
  "title": "VadResult",
  "type": "object"
}