1 Resources audio_config
Forgejo Actions edited this page 2026-11-26 06:34:52 +00:00

openwebui_audio_config (Resource)

Manages Open WebUI's audio engines: text to speech across OpenAI, Azure Speech, and Mistral, and speech to text across local faster-whisper, OpenAI, Deepgram, Azure, and Mistral.

POST /api/v1/audio/config/update requires both blocks and writes every key of each, so this resource reads the current configuration and overlays the attributes the plan names before it writes.

Setting stt.engine to the empty string makes Open WebUI load faster-whisper into its own process, downloading the model named by stt.whisper_model when it is not already cached. That apply can take minutes on its first run.

Example Usage

# Open WebUI requires both blocks together. Setting stt.engine to the empty
# string loads faster-whisper into the Open WebUI process and downloads the
# model named by stt.whisper_model when it is not already cached.
resource "openwebui_audio_config" "example" {
  tts = {
    engine         = "openai"
    model          = "tts-1"
    voice          = "alloy"
    openai_api_key = var.openai_api_key
  }

  stt = {
    engine         = "openai"
    model          = "whisper-1"
    openai_api_key = var.openai_api_key
  }
}

variable "openai_api_key" {
  type      = string
  sensitive = true
}

Schema

Required

Read-Only

  • id (String) Identifier of this singleton resource. Always audio.

Nested Schema for stt

Optional:

  • allowed_extensions (List of String) File extensions accepted for transcription. Stored as audio.stt.allowed_extensions.
  • azure_api_key (String, Sensitive) Open WebUI setting AZURE_API_KEY. Stored as audio.stt.azure.api_key. Sensitive.
  • azure_base_url (String) Open WebUI setting AZURE_BASE_URL. Stored as audio.stt.azure.base_url.
  • azure_locales (String) Open WebUI setting AZURE_LOCALES. Stored as audio.stt.azure.locales.
  • azure_max_speakers (String) Open WebUI setting AZURE_MAX_SPEAKERS. Stored as audio.stt.azure.max_speakers.
  • azure_region (String) Open WebUI setting AZURE_REGION. Stored as audio.stt.azure.region.
  • deepgram_api_key (String, Sensitive) Open WebUI setting DEEPGRAM_API_KEY. Stored as audio.stt.deepgram.api_key. Sensitive.
  • engine (String) Speech to text engine. The empty string runs faster-whisper in the Open WebUI process. Stored as audio.stt.engine.
  • mistral_api_base_url (String) Open WebUI setting MISTRAL_API_BASE_URL. Stored as audio.stt.mistral.api_base_url.
  • mistral_api_key (String, Sensitive) Open WebUI setting MISTRAL_API_KEY. Stored as audio.stt.mistral.api_key. Sensitive.
  • mistral_use_chat_completions (Boolean) Open WebUI setting MISTRAL_USE_CHAT_COMPLETIONS. Stored as audio.stt.mistral.use_chat_completions.
  • model (String) Open WebUI setting MODEL. Stored as audio.stt.model.
  • openai_api_base_url (String) Open WebUI setting OPENAI_API_BASE_URL. Stored as audio.stt.openai.api_base_url.
  • openai_api_key (String, Sensitive) Open WebUI setting OPENAI_API_KEY. Stored as audio.stt.openai.api_key. Sensitive.
  • openai_api_request_format (String) Request encoding for the OpenAI transcription API, for example multipart. Stored as audio.stt.openai.api_request_format.
  • supported_content_types (List of String) Content types accepted for transcription. Stored as audio.stt.supported_content_types.
  • whisper_model (String) faster-whisper model loaded when engine is the empty string. Stored as audio.stt.whisper_model.

Nested Schema for tts

Optional:

  • api_key (String, Sensitive) Key for the generic text to speech engine, used by ElevenLabs and others. Stored as audio.tts.api_key. Sensitive.
  • azure_speech_base_url (String) Open WebUI setting AZURE_SPEECH_BASE_URL. Stored as audio.tts.azure.speech_base_url.
  • azure_speech_output_format (String) Open WebUI setting AZURE_SPEECH_OUTPUT_FORMAT. Stored as audio.tts.azure.speech_output_format.
  • azure_speech_region (String) Open WebUI setting AZURE_SPEECH_REGION. Stored as audio.tts.azure.speech_region.
  • engine (String) Text to speech engine. The empty string is Open WebUI's built-in engine. Stored as audio.tts.engine.
  • mistral_api_base_url (String) Open WebUI setting MISTRAL_API_BASE_URL. Stored as audio.tts.mistral.api_base_url.
  • mistral_api_key (String, Sensitive) Open WebUI setting MISTRAL_API_KEY. Stored as audio.tts.mistral.api_key. Sensitive.
  • model (String) Open WebUI setting MODEL. Stored as audio.tts.model.
  • openai_api_base_url (String) Open WebUI setting OPENAI_API_BASE_URL. Stored as audio.tts.openai.api_base_url.
  • openai_api_key (String, Sensitive) Open WebUI setting OPENAI_API_KEY. Stored as audio.tts.openai.api_key. Sensitive.
  • openai_params (String) JSON object of extra parameters passed to the OpenAI speech API. Stored as audio.tts.openai.params.
  • split_on (String) Boundary the text is split on before synthesis, for example punctuation. Stored as audio.tts.split_on.
  • voice (String) Open WebUI setting VOICE. Stored as audio.tts.voice.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Open WebUI holds one audio configuration, so this resource is a singleton.
# Import it under its fixed id.
terraform import openwebui_audio_config.example audio