Conversation
…oints The Vocabulary is sent to built-in cloud providers but never reaches the custom OpenAI-compatible path, so models like gpt-4o-transcribe on custom or Azure endpoints get no term biasing. Build a framed instruction from the deduped terms (capped at 200) and emit it as the multipart prompt field. The prompt builder is a shared helper so other providers can reuse it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The custom dictionary (Vocabulary) is passed to the built-in cloud providers, but the custom OpenAI-compatible path never receives it. Users running models like
gpt-4o-transcribeon custom or Azure OpenAI endpoints get no transcription-time term biasing — every technical term, product name, or proper noun in their dictionary is ignored until post-hoc word replacement, which can't fix words the model never produced.Change
VocabularyBiasingPromptbuilds a framed instruction from the vocabulary — "The audio may reference the following names, products, and technical terms — transcribe any occurrences using these exact spellings: …" — rather than a bare comma list (a bare list gives instruction-following transcription models no guidance on what to do with it). Terms are trimmed, case-insensitively deduped, and capped at 200 to stay inside prompt budgets.OpenAICompatibleTranscriptionServiceemits the result as the multipartpromptfield — only when there is something to send.CloudTranscriptionServicepasses the dictionary terms into the custom-model path (it already fetched them for built-in providers).The helper is deliberately shared so other providers can adopt the same biasing format.
Relationship to the prompt-scoping change
This intentionally does not reintroduce the user's free-form TranscriptionPrompt on custom endpoints: cde93d3 ("Scope transcription prompts to Whisper models") nils
context.promptat the source for non-Whisper models, and that stays exactly as is. What's sent here is a different, narrower thing — a short app-constructed instruction derived only from the user's Vocabulary entries; with an empty dictionary the field is not sent and the request is byte-identical to today's.promptis part of the OpenAI transcription API spec, so OpenAI-compatible endpoints are expected to accept (or ignore) the field; if you'd rather make this opt-in per custom model, happy to add a toggle.Testing
Verified against an Azure OpenAI
gpt-4o-transcribedeployment: a product name the model consistently mis-heard is transcribed with the exact expected spelling once added to the Vocabulary, and the empty-dictionary case was confirmed to send nopromptfield.Summary by cubic
Pass custom vocabulary to OpenAI-compatible transcription endpoints as a biasing
promptso custom models likegpt-4o-transcribeuse exact term spellings during transcription. Nopromptis sent when the dictionary is empty.VocabularyBiasingPromptto build a short instruction from trimmed, deduped terms (max 200).OpenAICompatibleTranscriptionServicesends it as the multipartpromptwhen non-empty; otherwise unchanged.CloudTranscriptionServicenow forwards vocabulary to custom models; this does not re-enable free-form user prompts for non-Whisper models.Written for commit 92c5d98. Summary will update on new commits.