Files
zeekayandHanzo Dev f0d7a728c0 audio: OpenAI-compatible /v1/audio/transcriptions — the STT mirror of speech
/v1/audio/speech has shipped OpenAI-shaped TTS since the audio group landed;
STT never got its compat twin — api.hanzo.ai 404s /v1/audio/transcriptions and
the only STT path is the legacy store-bound /v1/process-speech-to-text. Chat's
composer therefore still listens with the browser recogniser (broken in Brave),
and the intended upgrade recorded in universe's chat configmap is blocked on
exactly this route.

AudioTranscriptions mirrors AudioSpeech end to end: same bearer auth (pk-
refused, auth before body validation so nothing is probe-able), same
model-route resolution, same balance gate, same unpriced usage row + trace.
Both surfaces stay in step — the beego controller and the ZAP-native handler
(audio.transcribe, gateway path /v1/audio/transcriptions) — with the multipart
body recovered from its own boundary line exactly as stt.process does.

stt gains the OpenAI-compatible provider: any /v1 root that serves
/audio/transcriptions (OpenAI itself, the in-cluster speech service, a BYO
node) registers as Type OpenAI with ProviderUrl as the root. The factory takes
flavor like the TTS factory always has; for STT it carries the audio's
language hint, bound from the request's language field.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-06 14:31:19 -07:00
..
2026-04-07 00:09:36 -07:00