Repository navigation
Studio: transcribe audio through a saved connection on the Audio page - #14289
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a440e7bb74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| language = body.language, | ||
| response_format = "verbose_json" if body.timestamps else "json", | ||
| timestamp_granularities = ["segment", "word"] if body.timestamps else None, | ||
| encrypted_api_key = None, |
There was a problem hiding this comment.
Forward retained legacy keys for connection transcripts
When credential migration fails for an upgraded browser, reconcileLegacyProviderKeys deliberately retains the browser key and the existing dictation adapter encrypts it per request (studio/frontend/src/features/chat/adapters/studio-model-dictation-adapter.ts:172-179). This new call hard-codes encrypted_api_key to None (and the new request model has no key field), so the Audio-page connection fails authentication even though the same saved connection still works for dictation; forward the retained encrypted key through this route.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this: a browser-only key exists only until the next provider sync moves it to the server (the migrate route fails only on 404 or an empty key), so this path does not reach a real session.
| stream_transcript( | ||
| lambda _on_progress: _external_source_transcript(body, source, request), | ||
| body.title or source.name, |
There was a problem hiding this comment.
Track Audio-page connection calls in the API monitor
When transcription on the Audio page uses a saved connection, this streaming lambda calls the provider without _monitored_media_request; the existing proxied STT route explicitly opens a row and records the reply at studio/backend/routes/inference.py:26028-26051. Consequently this new external request, its error, and its transcript are absent from the API monitor even though other saved-connection media traffic is tracked; wrap the deferred provider run in the monitor and set its reply.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this here: monitor coverage for the Audio page is a separate parity change; the transcript itself is streamed and saved correctly.
|
The PR adds |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Review + reproduction evidencePinned review: I ran Audio > Transcribe against a self-hosted speaches server (faster-whisper-tiny), saved as a Custom connection, on the merge base
Conclusion: works end to end and is ready to merge. Land it before #14288, which then needs main merged in (audio-page.tsx, 3 hunks). |
# Conflicts: # studio/frontend/src/features/audio/audio-page.tsx
…nAI only, no local API example [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1726700c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mode === "transcribe" && transcribeConnection | ||
| ? transcribeConnection.id | ||
| : (connection && speakConnection.modelId) || selectorValue |
There was a problem hiding this comment.
Hide the local eject state for connection picks
When a local STT model is already resident and the user switches to this Connected value, the loaded prop remains tied to sttReady and the onEject guard below remains enabled from selectorValue. The check/eject affordance is therefore attached to the connected model; clicking it unloads the old on-device model without clearing the connection, while a connection chosen with no resident local model is shown as unloaded. Treat the connection as independently ready and suppress the local eject affordance while it is selected.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this: the eject only unloads the resident on-device model, which the connection run does not use, so nothing is lost or misrouted; it is cosmetic.
…xtral TTS out of Transcribe [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48ee3ba5d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dictationModel?: string, | ||
| ): string[] { | ||
| const ids = [ | ||
| ...(isOpenAIApi(connection) ? OPENAI_TRANSCRIBE_MODELS : []), |
There was a problem hiding this comment.
Seed Mistral transcription models outside the chat catalog
When a user creates an ordinary Mistral connection and loads its catalog, models and availableModels contain only IDs admitted by the chat-oriented allowlist in studio/backend/core/inference/providers.py:249-254, which excludes voxtral-mini-latest; unlike OpenAI, Mistral gets no hard-coded transcription IDs here, and its connection form does not accept manual IDs. Consequently this returns no Connected Transcribe entries unless the user first configures the unrelated dictation setting manually, so the Audio page cannot discover Mistral's supported transcription model; seed Voxtral for Mistral or retain STT IDs in a separate catalog.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this for a follow-up: seeding Mistral's transcription models is new provider support, not a defect here. A Mistral connection lists no Connected Transcribe rows today, the same as before this PR, and nothing it lists is misrouted.
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48ee3ba5d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "on-device model." | ||
| ), | ||
| ) | ||
| response = await _external_stt_transcription( |
There was a problem hiding this comment.
Append STT paths before base URL queries
In the new /audio/transcribe/source connection branch, a saved connection with a query-bearing base URL (an explicitly supported shape in validate_provider_base_url, e.g. https://gateway/v1?key=...) reaches ExternalProviderClient.create_transcription, which still builds f"{self.base_url}/audio/transcriptions" at studio/backend/core/inference/external_provider.py:7597. The suffix therefore becomes part of the query instead of the path, so every Audio-page transcription for that connection targets /v1 and fails; use _append_provider_path as speech and image requests do.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pre-existing, not from this PR: main builds the same URL in create_transcription and the existing dictation route already reaches it. It needs its own fix covering both callers.

Settings > Voice can send dictation to a saved speech-to-text connection, but the Audio page's Transcription tool only offered on-device models.
The Transcribe picker now has a Connected section. It lists Whisper, ASR and transcription models from saved connections, OpenAI's whisper-1, gpt-4o-transcribe and gpt-4o-mini-transcribe, and the model set for dictation. Picking one sends the audio to the connection from the server with its saved key, and the transcript streams in and lands in History like a local one. Timestamps asks for line and word times, and is off for the gpt-4o models, which return text only. Speakers stays off, and nothing loads on the device.
Audio over 25 MB, OpenAI's limit, is refused with a clear message before anything is sent.
Part of #14194
Fixes #14194
Before / after
Studio built at current main, which already has the Speak connection from #14288 (left), and at this branch's head (right), with a saved custom connection named Scene Speech Box pointing at a local OpenAI-compatible server that lists
kokoroandwhisper-large-v3.Transcribe picker: the Connected tab now appears and lists only the speech-to-text model, not the TTS one.
Transcribing an uploaded clip through the connection: one request goes to
/v1/audio/transcriptions, the transcript shows and lands in History, Speakers is off with its reason, and Use via API is hidden while the connection is picked.