generate-transcript
The generate-transcript transform runs speech-to-text over audio files listed in an upstream audio-metrics JSON document, using PCM bytes from convert-to-pcm outputs keyed by MD5.
When to use it
Use after convert-to-pcm and audio-metrics in an audio analytics pipeline when you need searchable transcripts (plain text or time-segmented JSON).
It also accepts audio directly, with no metrics document alongside it, which is how hydrate-protobuf SignalPDU feeds it. Two artefact shapes are recognised on that path:
- A single WAV: transcribed whole, and the transcript is keyed by the audio md5.
- An origin-audio ZIP (
groupByOrigin: true): eachorigins/<originUuid>.wavis transcribed separately, and the transcript is keyed byoriginUuid.
Per-origin transcripts
Under groupByOrigin the audio artefact is a delta window, not a cumulative file, so this node carries history forward itself:
- Each origin stream is transcribed, then stamped with wall clock: segments keep relative
start/endseconds inside the stream and gain absolutestartMs/endMsfrom the manifest’sstreamStartUnixMs. - The node loads its own previous transcript and merges the new window into it per
originUuid. Segments repeated across windows are deduplicated on(originUuid, startMs, endMs), the surviving segments are ordered by wall clock, and each entry’stextis rebuilt from them so it never disagrees with its segments. meta.lastAudioMd5andmeta.sourceAudioMd5record the audio this run consumed. A reprocess over unchanged audio completes without uploading, so a transcript blob is not churned and dashboards are not rescheduled.
Dashboards should prefer startMs / endMs when present and fall back to start / end seconds for legacy single-WAV transcripts.
Limitations
- On the metrics-driven path, requires
audio-metricsJSON and matching PCM blobs in upstream inputs; missing metrics with no direct audio payload fails the node. - Supported
modelvalues:whisperx(default) andfaster-whisper, which share the speech weights baked into the runner image at build time, so they run without network access. Shipped images carrysmall(the default,WHISPER_MODEL_SIZE) andbase(WHISPER_EXTRA_MODEL_SIZES).wav2vecdownloads its model from Hugging Face on first use andwhisperneeds theopenai-whisperpackage, which the image does not ship: neither works on an air-gapped cluster. outputFormat:plainorsegments(defaultsegments). Invalid values fail the node.
Configuration (summary)
| Property | Default | Description |
|---|---|---|
outputFormat | segments | plain or segments |
includeTimestamps | true | Include timing in segment output |
model | whisperx | ASR backend (see supported list above) |
modelSize | the image default (WHISPER_MODEL_SIZE, small in shipped images) | Model size passed to the backend. Only sizes baked into the image load offline: small and base in shipped images. small is more accurate than base and takes about two and a half times as long. |
device | cpu | Inference device. Leave it at cpu: the shipped image carries CPU-only inference libraries, so cuda fails. |
language | en | Transcription language code |
initialPrompt | (none) | Text the model is primed with before each piece of audio, for example the kind of traffic ("Military air combat radio."). Optional. |
vocabulary | (none) | The scenario’s callsigns, codewords and other words the transcript must get right: a list of strings, or an object of named lists ({"callsigns": ["TAMIM 11"], "codes": ["WINCHESTER"]}). The model is primed with every term once, after initialPrompt, and writes them as given far more reliably. Recorded in the transcript’s meta. Optional. |
dataSourceName | (runner default) | Object store for outputs |
Manifest schema lists outputFormat and includeTimestamps. The runtime also accepts model, modelSize, device, language, initialPrompt and vocabulary as used by the processor.
Keep scenario words in the session template’s node configuration, never in the runner: they change with every exercise. Whisper reads only about 220 tokens of prompt and drops the front of a longer one, so keep the vocabulary to the words that matter (a few dozen terms); the runner logs a warning when the prompt grows long. Runner builds that predate these keys ignore them.
Related
- Audio Utils
- convert-to-pcm
- audio-metrics
- voice-analysis
- hydrate-protobuf (SignalPDU audio, including
groupByOrigin)