Zum Inhalt
HALOWERK

Audiowerk

trim silence

Finds silent stretches with ffmpeg level detection and shortens each one that exceeds the threshold length. Pauses are shortened to a floor, never removed outright: a pause cut to zero makes the end of one sentence collide with the start of the next, which is a worse defect than the dead air it replaced. The floor defaults to 400 milliseconds, roughly the pause a speaker leaves between sentences, and is settable. Leading and trailing silence are treated separately and can be removed.

POST https://audio.halowerk.com/trim-silence

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
audioobjectJaThe recording. Either url or content_base64.
threshold_secondsnumberNeinPauses longer than this are shortened.
keep_secondsnumberNeinWhat a shortened pause is left at. Zero makes sentences collide and is allowed but not advised.
noise_floor_dbintegerNeinLevel below which audio counts as silence. Raise it for a noisy recording.
trim_edgesbooleanNeinRemove leading and trailing silence completely.
output_formatstringNeinFormat of the trimmed file.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "audio"
  ],
  "additionalProperties": false,
  "properties": {
    "audio": {
      "type": "object",
      "additionalProperties": false,
      "description": "The recording. Either url or content_base64.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048,
          "description": "Public http(s) URL."
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000,
          "description": "The file inline, base64."
        }
      }
    },
    "threshold_seconds": {
      "type": "number",
      "minimum": 0.2,
      "maximum": 30,
      "default": 1.5,
      "description": "Pauses longer than this are shortened."
    },
    "keep_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 5,
      "default": 0.4,
      "description": "What a shortened pause is left at. Zero makes sentences collide and is allowed but not advised."
    },
    "noise_floor_db": {
      "type": "integer",
      "minimum": -70,
      "maximum": -20,
      "default": -35,
      "description": "Level below which audio counts as silence. Raise it for a noisy recording."
    },
    "trim_edges": {
      "type": "boolean",
      "default": true,
      "description": "Remove leading and trailing silence completely."
    },
    "output_format": {
      "type": "string",
      "enum": [
        "mp3",
        "wav",
        "flac",
        "opus"
      ],
      "default": "mp3",
      "description": "Format of the trimmed file."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "audio": {},
  "threshold_seconds": 1.5,
  "keep_seconds": 0.4,
  "noise_floor_db": -35,
  "trim_edges": true,
  "output_format": "mp3"
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →