diff --git a/README.md b/README.md index 3a3b2fc6..772f5f72 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ A lightweight, secure, cloud-native ACP harness that bridges Discord and any [Ag - **Session pool** — one CLI process per thread, auto-managed lifecycle - **ACP protocol** — JSON-RPC over stdio with tool call, thinking, and permission auto-reply support - **Kubernetes-ready** — Dockerfile + k8s manifests with PVC for auth persistence +- **Voice message STT** — auto-transcribes Discord voice messages via Groq, OpenAI, or local Whisper server ([docs/stt.md](docs/stt.md)) ## Quick Start diff --git a/charts/openab/templates/configmap.yaml b/charts/openab/templates/configmap.yaml index 95bd68ef..194d8c25 100644 --- a/charts/openab/templates/configmap.yaml +++ b/charts/openab/templates/configmap.yaml @@ -40,6 +40,17 @@ data: [reactions] enabled = {{ ($cfg.reactions).enabled | default true }} remove_after_reply = {{ ($cfg.reactions).removeAfterReply | default false }} + {{- if ($cfg.stt).enabled }} + {{- if not ($cfg.stt).apiKey }} + {{ fail (printf "agents.%s.stt.apiKey is required when stt.enabled=true" $name) }} + {{- end }} + + [stt] + enabled = true + api_key = "${STT_API_KEY}" + model = "{{ ($cfg.stt).model | default "whisper-large-v3-turbo" }}" + base_url = "{{ ($cfg.stt).baseUrl | default "https://api.groq.com/openai/v1" }}" + {{- end }} {{- if $cfg.agentsMd }} AGENTS.md: | {{- $cfg.agentsMd | nindent 4 }} diff --git a/charts/openab/templates/deployment.yaml b/charts/openab/templates/deployment.yaml index f1ab9b0b..0d45041d 100644 --- a/charts/openab/templates/deployment.yaml +++ b/charts/openab/templates/deployment.yaml @@ -45,6 +45,13 @@ spec: name: {{ include "openab.agentFullname" $d }} key: discord-bot-token {{- end }} + {{- if and ($cfg.stt).enabled ($cfg.stt).apiKey }} + - name: STT_API_KEY + valueFrom: + secretKeyRef: + name: {{ include "openab.agentFullname" $d }} + key: stt-api-key + {{- end }} - name: HOME value: {{ $cfg.workingDir | default "/home/agent" }} {{- range $k, $v := $cfg.env }} diff --git a/charts/openab/templates/secret.yaml b/charts/openab/templates/secret.yaml index fd090208..2cdd27c8 100644 --- a/charts/openab/templates/secret.yaml +++ b/charts/openab/templates/secret.yaml @@ -14,6 +14,9 @@ metadata: type: Opaque data: discord-bot-token: {{ $cfg.discord.botToken | b64enc | quote }} + {{- if and ($cfg.stt).enabled ($cfg.stt).apiKey }} + stt-api-key: {{ $cfg.stt.apiKey | b64enc | quote }} + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/openab/values.yaml b/charts/openab/values.yaml index 22b7a255..01be5561 100644 --- a/charts/openab/values.yaml +++ b/charts/openab/values.yaml @@ -69,6 +69,11 @@ agents: reactions: enabled: true removeAfterReply: false + stt: + enabled: false + apiKey: "" + model: "whisper-large-v3-turbo" + baseUrl: "https://api.groq.com/openai/v1" persistence: enabled: true storageClass: "" diff --git a/docs/stt.md b/docs/stt.md index 1eea3978..157b6f66 100644 --- a/docs/stt.md +++ b/docs/stt.md @@ -125,6 +125,26 @@ base_url = "http://192.168.1.100:8080/v1" - **Ollama** — does not expose an `/audio/transcriptions` endpoint. +## Helm Chart (Kubernetes) + +When deploying via the openab Helm chart, STT is a first-class config block — no manual configmap patching needed: + +```bash +helm upgrade openab openab/openab \ + --set agents.kiro.stt.enabled=true \ + --set agents.kiro.stt.apiKey=gsk_xxx +``` + +The API key is stored in a K8s Secret and injected as an env var (never in plaintext in the configmap). You can also customize model and endpoint: + +```bash +helm upgrade openab openab/openab \ + --set agents.kiro.stt.enabled=true \ + --set agents.kiro.stt.apiKey=gsk_xxx \ + --set agents.kiro.stt.model=whisper-large-v3-turbo \ + --set agents.kiro.stt.baseUrl=https://api.groq.com/openai/v1 +``` + ## Disabling STT Omit the `[stt]` section entirely, or set: