Loading…
Reference in a new issue
No description provided.
Delete branch "feat/350-managed-asr-adapter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #350 (its last open criterion:
vocabularyon a managed adapter). Delivers the managed-ASR half of #128; the per-campaign BYO-AI half follows separately.You can now transcribe with OpenAI or Groq, or any server speaking
POST /v1/audio/transcriptions, instead of the bundled WhisperX — and say so explicitly rather than having it guessed from the URL.What
OpenAiCompatibleAsrProvider(app/providers/asr_openai.py, registered asopenai— the wire shape, not the vendor): multipartfile/model/response_format=verbose_json/timestamp_granularities[](word + segment)/language/promptfor vocabulary (40 terms, since the 224-token prompt window drops the tail silently), Bearer auth. Realwords[]spans (word_timestamps=True); interpolation only if a server omits words. Declaresmax_bytes = 25 MiB(identical on OpenAI and Groq), no concurrency limit, and a newenforces_own_rate_limitcapability so the conformance suite stops demanding a concurrency figure from a managed synchronous adapter. 429 →ProviderRateLimitError(retry_after), 413 →ProviderInputTooLargeError. Model defaults per host (whisper-1,whisper-large-v3-turbo); a third-party server must name its model or gets a clear configuration error. Language codes coerced both ways (~40 languages; an unrecognised value is dropped so per-request detection takes over rather than failing every span). URL building tolerates Groq's/openai/v1base.transcribe_with_optional_vadresolves the provider up front and, whenneeds_chunkingand a track exceeds a declared limit, takes the span-cutting path even with trimming off;provider_max_span_secondsconverts the byte cap to ~802 s at the cut format;split_oversized_spanswindows a still-oversized span with 2 s overlap and a midpoint seam rule so nothing is doubled or dropped; >25 % refused windows raise rather than return a partial.asr_provider/asr_provider_resolved/asr_provider_choices/asr_modelon the bot-settings API (blank preserves,autoclears, mirroring the LLM select); a select and model field in the Whisper block; the Test button speaks the chosen dialect.whisper_providerrenamed toasr_provider— it shipped in v4.1.1 with no UI and nothing had set it.asr_modelwired throughprocess_audiowith the model asserted on the wire on both the plain and VAD paths, plus an AST guard on the call site because the task has no harness.openaicase +verbose_jsonfake — all 15 ASR cases pass, including vocabulary-on-the-wire and byte-limit-with-zero-requests.No live call against OpenAI or Groq was possible (no keys); the fake follows the documented
verbose_jsonshape, cited in the adapter docstring; the monthly canary is what catches drift. Rebased over #357 and #356 (one conflict: the transcription call's try/finally from #356 plus this branch's one keyword).Verification
test_asr_openai,test_asr_chunking,test_provider_concurrency) re-run green after it. Frontend 486 passed, eslint clean apart from the pre-existing warning. ruff clean. No migration; no bot contract change.🤖 Generated with Claude Code