Skip to content

Transcribe resource

The transcribe: resource converts speech in an audio file to text using a Whisper model - OpenAI's API, Groq's API, a self-hosted OpenAI-compatible server, or fully offline via a local whisper-cli binary with no API key at all.

Where it runs

Both workflow mode and agent mode. In agent mode, the same executor is available as the transcribe_audio built-in tool.

Basic usage

yaml
# resources/transcribe.yaml
actionId: transcribe
name: Transcribe Audio
transcribe:
  file: /data/meeting.mp3
  backend: openai
yaml
# resources/respond.yaml
actionId: respond
requires: [transcribe]
apiResponse:
  success: true
  response:
    text: "{{ output('transcribe') }}"

Backends

backendRequiresFormatsNotes
openai (default)OPENAI_API_KEYmp3, mp4, mpeg, mpga, m4a, wav, webmWhisper API, model default whisper-1
groqGROQ_API_KEYmp3, mp4, mpeg, mpga, m4a, wav, webmFaster/cheaper Whisper-compatible API, e.g. whisper-large-v3
local-mp3, mp4, mpeg, mpga, m4a, wav, webmSelf-hosted OpenAI-compatible Whisper HTTP server, baseURL points at it
whisper-cpplocal whisper-cli binary on PATHflac, mp3, ogg, wav onlyFully offline - no API key, no network after the model is cached

Offline transcription (whisper-cpp)

yaml
transcribe:
  file: /data/meeting.mp3
  backend: whisper-cpp

No config beyond file and backend is required. On first use, a default English model (ggml-base.en.bin, ~140MB) auto-downloads to ~/.kdeps/models/ - the same cache directory used by chat:'s llamafile models - and every later call reuses the cached file. Requires the whisper-cli binary from whisper.cpp to be installed and on PATH.

Use modelPath to point at a different GGML model (a multilingual or larger model for better accuracy):

yaml
transcribe:
  file: /data/interview.wav
  backend: whisper-cpp
  modelPath: /models/ggml-medium.bin
  language: en

Configuration options

OptionApplies toDescription
fileallPath to the audio file (required)
backendallopenai (default), groq, local, or whisper-cpp
modelopenai, groqModel name. Default whisper-1; Groq: whisper-large-v3
baseURLlocalBase URL of the self-hosted server. Ignored for whisper-cpp
modelPathwhisper-cppPath to a GGML model file. Default: auto-downloaded ggml-base.en.bin
languageallISO-639-1 language hint, e.g. en
promptopenai, groq, localOptional context prompt to guide transcription style/vocabulary
responseFormatopenai, groq, localtext (default), json, srt, verbose_json, vtt
temperatureopenai, groq, localSampling temperature, 0-1
timestampGranularitiesopenai, groq, local["segment"] and/or ["word"], only with responseFormat: verbose_json

Output

The transcribed text, as a plain string:

json
"This is a kdeps transcription test."

See also

Released under the Apache 2.0 License.