Skip to main content

Speech-to-Text Packages

Built-in speech-to-text packages transcribe supported audio or video attachments before the model request. Each provider package installs an input slot at agent/input/speech_to_text, so install only one STT provider package in a core at a time.

Packages

PackageProviderCapability
stt_openaiOpenAInetwork.fetch
stt_groqGroqnetwork.fetch
stt_deepgramDeepgramnetwork.fetch
stt_assemblyaiAssemblyAInetwork.fetch
stt_geminiGemininetwork.fetch
stt_dashscopeAlibaba Cloud Model Studionetwork.fetch
stt_baiduBaidu Cloud Speech Recognitionnetwork.fetch
stt_tencentTencent Cloud ASRnetwork.fetch

Install

Use the interactive manager:

uv run demiurge package

Or preview and install with subcommands:

uv run demiurge package install stt_openai --core assistant --preview
uv run demiurge package install stt_openai --core assistant

To switch providers, uninstall the current STT package first:

uv run demiurge package uninstall stt_openai --core assistant
uv run demiurge package install stt_gemini --core assistant

Shared Behavior

All STT packages install:

agent/input/speech_to_text/
agent/lib/stt_common/
agent/lib/<provider>/

The input slot appends to the serial input pipeline. When a turn has a supported audio or video attachment, the slot requires network.fetch, sends the attachment to the provider, and adds a Voice message transcript section to the current user prompt. If no supported attachment is present, it does nothing.

Supported media includes common audio formats such as AAC, FLAC, M4A, MP3, OGG, OPUS, WAV, and WebM, plus MP4/WebM video attachments when the provider accepts them.

Options

PackageOptions
stt_openaiapi_key, language, context_hint, timestamp_granularity, include_metadata
stt_groqapi_key, language, context_hint, timestamp_granularity, include_metadata
stt_deepgramapi_key, language, detect_language, diarization, include_metadata
stt_assemblyaiapi_key, language, detect_language, speaker_labels, include_metadata
stt_geminiapi_key, language, include_timestamps, include_metadata
stt_dashscopeapi_key, language, include_metadata, enable_itn
stt_baiduapi_key, secret_key, access_token, language, dev_pid, include_metadata
stt_tencentsecret_id, secret_key, region, engine_model_type, include_metadata

timestamp_granularity choices are none, segment, and word.

Optional secret options can be passed during installation or left empty so the installed provider config reads environment variables at runtime.

Credential Environment Variables

PackageEnvironment variables
stt_openaiDEMIURGE_OPENAI_API_KEY or OPENAI_API_KEY
stt_groqDEMIURGE_GROQ_API_KEY or GROQ_API_KEY
stt_deepgramDEMIURGE_DEEPGRAM_API_KEY or DEEPGRAM_API_KEY
stt_assemblyaiDEMIURGE_ASSEMBLYAI_API_KEY or ASSEMBLYAI_API_KEY
stt_geminiDEMIURGE_GEMINI_API_KEY, GEMINI_API_KEY, or GOOGLE_API_KEY
stt_dashscopeDEMIURGE_DASHSCOPE_API_KEY or DASHSCOPE_API_KEY
stt_baiduDEMIURGE_BAIDU_ACCESS_TOKEN, or DEMIURGE_BAIDU_API_KEY plus DEMIURGE_BAIDU_SECRET_KEY
stt_tencentDEMIURGE_TENCENT_SECRET_ID plus DEMIURGE_TENCENT_SECRET_KEY

Verify

List installed packages:

uv run demiurge package list --core assistant

Send an audio attachment through the TUI or a configured channel. The model request should include a Voice message transcript section before or beside the original user text.

Uninstall

uv run demiurge package uninstall stt_openai --core assistant --preview
uv run demiurge package uninstall stt_openai --core assistant

Uninstall removes the package-owned input slot and provider lib. Shared agent/lib/stt_common/ is kept if another installed package still references it.