On this page
Sommatic Docs
Open portal

Audio and Video Transcription

Automatic Speech Recognition over audio and video streams using faster-whisper (CTranslate2-backed Whisper).

View as Markdown
Open in
AI Available ai.transcribe Version 1.0.0 Execution: async

Transcribes audio or video on CPU with faster-whisper (int8) and returns the full text, the detected language and, when word_timestamps is on, timed segments.

Single-pass decoding on CPU with configurable model size, beam width, and language hint. Suitable for utility-grade transcription of meetings, voicemails, and short-form media. For speaker diarization, 100+ locales, or custom vocabulary, use connectors.microsoft.azure.speech.

Features:

  • Model selection: tiny, base (default), or small. Larger models increase accuracy at the cost of latency and memory.
  • Beam search: Configurable beam size; beam > 1 improves transcription quality on noisy input at a linear cost.
  • Language: ISO 639-1 hint (es, en, pt, ...) or auto-detection from the first 30 seconds of audio.
  • Word timestamps: Optional per-segment timestamps for subtitle generation, chaptering, or evidence anchoring.
  • Input formats: mp3, wav, m4a, ogg, flac, mp4, mov, webm. Container demuxing and PCM resampling to 16 kHz handled internally via ffmpeg.
  • Silent input handling: Emits port empty when Voice Activity Detection finds no speech in the stream.

How it works

  1. Resolves the node config: expressions in config keys are evaluated against the run; the incoming item is used as-is.
  2. Reads content_base64 or file_path from the config first, then from the incoming item. If neither is present it returns error.
  3. In Python, an existing file_path is used directly; otherwise the base64 bytes are written to a temporary file.
  4. Loads the Whisper model model_size (default base) and transcribes with language (empty = auto-detect), beam_size (default 1) and word_timestamps.
  5. Joins the segment texts with spaces into text. segments is filled only when word_timestamps is true.
  6. Python failures return error; an empty transcript returns empty; anything else extracted.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-transcribe",
  "label": "Transcribe voicemail",
  "operator_slug": "ai.transcribe",
  "operator_version": "1.0.0",
  "config": {
    "model_size": "base",
    "language": "en",
    "word_timestamps": true,
    "beam_size": 1,
    "execution": {
      "timeout_ms": 900000
    }
  }
}

Configuration

model_size string Optional

CPU-friendly model sizes. Larger requires more memory and time.

Default: base

Allowed values: tinybasesmall

language string Optional

Language hint (e.g., es, en, pt). Leave empty to auto-detect.

word_timestamps boolean Optional

Emit per-segment timestamps in the output.

Default: false

beam_size number Optional

Higher values improve quality at the cost of speed.

Default: 1

Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

word_timestamps
When true, segments lists { start, end, text } per segment, in seconds. Word-level timings are not returned. When false, segments is [].
language
ISO 639-1 hint. Leave it empty to auto-detect; the detected code is in metadata.language.
execution.timeout_ms
Timeout of the Python run. When unset the code uses 900000 ms (15 min); the schema shows 300000.
content_base64 / file_path
Not declared in the config schema, but read from the config before the incoming item. Use them to point at a file with an expression, e.g. {{ $json.attachment.content_base64 }}.

Output ports

extracted default

The transcript has text.

Data
{
  "text": "Hello, this is a reminder about tomorrow’s delivery window.",
  "chars": 59,
  "empty": false,
  "method": "faster-whisper-base",
  "metadata": {
    "language": "en",
    "language_probability": 0.98,
    "duration_seconds": 4.2,
    "segments_count": 1
  },
  "segments": [
    {
      "start": 0,
      "end": 4.1,
      "text": "Hello, this is a reminder about tomorrow’s delivery window."
    }
  ]
}
empty

The model returned no text (silence or no speech). Same shape with text: "".

Data
{
  "text": "",
  "chars": 0,
  "empty": true,
  "method": "faster-whisper-base",
  "metadata": {
    "language": "en",
    "language_probability": 0.41,
    "duration_seconds": 12,
    "segments_count": 0
  },
  "segments": []
}
error

The input is missing or the script fails. data is { error } or { error, stderr }.

Data
{
  "error": "Python timed out after 900000ms",
  "stderr": ""
}

In expressions

What a later node can read from this node's output with $("Audio and Video Transcription").item.json.<path> (write your node's label instead of Audio and Video Transcription). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through extracted, from the output shown in Ports.

ExpressionEditorWorker
$("Audio and Video Transcription").item.json.textstring= "Hello, this is a reminder about tomorrow’s d…"Full transcribed text.
$("Audio and Video Transcription").item.json.charsnumber= 59
$("Audio and Video Transcription").item.json.emptyboolean= false
$("Audio and Video Transcription").item.json.methodstring= "faster-whisper-base"
$("Audio and Video Transcription").item.json.metadataobject= {…}
$("Audio and Video Transcription").item.json.segmentsarray= […] (1)
$("Audio and Video Transcription").item.json.metadata.languagestringNot suggested by the editor= "en"—
$("Audio and Video Transcription").item.json.metadata.language_probabilitynumberNot suggested by the editor= 0.98—
$("Audio and Video Transcription").item.json.metadata.duration_secondsnumberNot suggested by the editor= 4.2—
$("Audio and Video Transcription").item.json.metadata.segments_countnumberNot suggested by the editor= 1—

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Errors

Message Port Cause and fix
Either content_base64 or file_path is required. error Neither the config nor the incoming item has content_base64 or file_path. Map the file from the previous node.
Either content_base64 or file_path is required error Raised by the Python script when file_path does not exist on the orchestrator host. Data also carries stderr.
<faster-whisper or decoder error> error The file cannot be decoded as audio or video, or the model could not be loaded on the host.
Python timed out after <timeout_ms>ms error The script exceeded execution.timeout_ms. Raise it or process fewer pages.
Python runtime not available (ENOENT) error No Python interpreter is available on the orchestrator host.

Input contract

content_base64 string Optional

Audio/video content base64-encoded.

file_path string Optional

Alternative: local file path.

Output contract

text string Optional

Full transcribed text.

chars number Optional
empty boolean Optional
method string Optional
metadata object Optional
segments array Optional

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "ai.transcribe",
  "name": "Audio and Video Transcription",
  "category": "ai",
  "version": "1.0.0",
  "description": "Automatic Speech Recognition over audio and video streams using faster-whisper (CTranslate2-backed Whisper).\n\n  Single-pass decoding on CPU with configurable model size, beam width, and language hint. Suitable for utility-grade transcription of meetings, voicemails, and short-form media. For speaker diarization, 100+ locales, or custom vocabulary, use `connectors.microsoft.azure.speech`.\n\n  **Features:**\n  - **Model selection:** `tiny`, `base` (default), or `small`. Larger models increase accuracy at the cost of latency and memory.\n  - **Beam search:** Configurable beam size; beam > 1 improves transcription quality on noisy input at a linear cost.\n  - **Language:** ISO 639-1 hint (`es`, `en`, `pt`, ...) or auto-detection from the first 30 seconds of audio.\n  - **Word timestamps:** Optional per-segment timestamps for subtitle generation, chaptering, or evidence anchoring.\n  - **Input formats:** mp3, wav, m4a, ogg, flac, mp4, mov, webm. Container demuxing and PCM resampling to 16 kHz handled internally via ffmpeg.\n  - **Silent input handling:** Emits port `empty` when Voice Activity Detection finds no speech in the stream.",
  "capabilities": [
    "asr",
    "speech-to-text",
    "audio",
    "video",
    "transcription"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "model_size": {
        "type": "string",
        "title": "Whisper Model Size",
        "enum": [
          "tiny",
          "base",
          "small"
        ],
        "default": "base",
        "description": "CPU-friendly model sizes. Larger requires more memory and time."
      },
      "language": {
        "type": "string",
        "title": "Language (ISO 639-1)",
        "description": "Language hint (e.g., es, en, pt). Leave empty to auto-detect."
      },
      "word_timestamps": {
        "type": "boolean",
        "title": "Word Timestamps",
        "default": false,
        "description": "Emit per-segment timestamps in the output."
      },
      "beam_size": {
        "type": "number",
        "title": "Beam Size",
        "default": 1,
        "description": "Higher values improve quality at the cost of speed."
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    }
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "content_base64": {
        "type": "string",
        "description": "Audio/video content base64-encoded."
      },
      "file_path": {
        "type": "string",
        "description": "Alternative: local file path."
      }
    }
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "text": {
        "type": "string",
        "description": "Full transcribed text."
      },
      "chars": {
        "type": "number"
      },
      "empty": {
        "type": "boolean"
      },
      "method": {
        "type": "string"
      },
      "metadata": {
        "type": "object"
      },
      "segments": {
        "type": "array"
      }
    }
  },
  "ports": [
    {
      "port_id": "extracted",
      "label": "Transcribed",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "empty",
      "label": "No Speech",
      "is_default": false,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "tags": [
    "ai",
    "asr",
    "audio",
    "video",
    "whisper",
    "transcription"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://me.veripass.com/sommatic",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
No
Capabilities
asrspeech-to-textaudiovideotranscription
Tags
aiasraudiovideowhispertranscription

Notes and limits

  • Each run is a new Python process, so the model is loaded on every run; larger model_size values add memory and start-up time.
  • No voice activity filter is configured: empty means the model produced no text, not that a VAD step found silence.
  • No speaker diarization and no custom vocabulary.
  • file_path is a path on the orchestrator host. content_base64 wins when both are present.
  • The extraction runs in a Python subprocess. On first use the orchestrator creates a virtual environment and installs the pinned requirements, which can take minutes; later runs reuse it.
  • The Python result is limited to 50 MB of output; above it the node leaves through error.
  • The engine does not apply execution.retryOnFail, maxTries, waitBetweenTries or continueOnFail to this node. Handle failures by wiring the error port.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs