You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(voice): add a manual speech model unload action - #41501
After dictation, a local speech recognition model can stay resident until its idle timeout expires. Voice settings need a way to release that memory on demand.
Change
Add Unload now under Settings → Voice → Advanced. It uses the selected transcription environment's model state and shares the existing worker disposal path. The action is available when the engine has a model loaded and is idle. The model stays downloaded and selected, and the next transcription loads it again.
Scope
A focused feature from a vouched contributor. The control applies to environment-hosted local speech recognition in the shared web and desktop Voice settings.
Verification
vp run check:changed upstream/main --concurrency 1 passed with 86 tests and type-checking across 39 packages. The speech service and HTTP tests cover model disposal, preserving the installed selection, reloading on the next run, busy rejection, and permission enforcement.
The targeted React Compiler coverage test passed for VoiceSettingsPanel.tsx.
In the T3 Browser panel on Windows, transcribed a speech sample with Parakeet, started a live stream, and confirmed the button was disabled and the server returned speech_busy. Closed the stream, clicked Unload now, confirmed the model was still installed and selected, and transcribed the sample again successfully.
Repeated the unload through a second, directly paired environment using DPoP. The second environment reported its own model state and retained its model selection after the action.
Before
After
Busy and unloaded states
Active stream
After unload
Implemented with gpt-6.2-sol using the Codex harness in T3 Code.
No actionable comments were generated in the recent review.
Walkthrough
The speech service now reports model load state and supports manual unloading. An authorized HTTP endpoint and client operation expose unloading to the settings panel, which displays model-memory status and an unload control.
Changes: Speech model memory
Layer / File(s)
Summary
Service unload and load-state reporting packages/contracts/src/speech.ts, apps/server/src/speech/SpeechService.ts, apps/server/src/speech/SpeechService.test.ts
The service reports busy, loaded, or unloaded status and adds an exclusive unloadModel operation. Tests cover repeated unloads, model reload, idle timeout, and active streams.
Unload API and client operation packages/contracts/src/environmentHttp.ts, apps/server/src/speech/http.ts, packages/client-runtime/src/voice-input/environment.ts, packages/client-runtime/src/voice-input/index.ts, apps/server/src/speech/http.test.ts
The authorized POST /api/voice/models/unload endpoint calls the service operation. The client runtime exposes the request. HTTP tests cover scope enforcement and error handling.
Settings control and guidance apps/web/src/components/settings/VoiceSettingsPanel.tsx, apps/web/src/i18n/translations/*.json, docs/user/voice-input.md
Advanced speech settings display model-memory status and offer an unload action when the model is loaded. Translations and documentation describe the status, unload action, and reload behavior.
This adds an Unload now control that releases an idle speech model from memory; the model stays downloaded and selected and reloads on the next transcription. No remaining merge risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(voice): add a manual speech model unload action" matches the main change: a manual Unload now action that releases the speech model from memory. It is a conventional commit title in pl…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template and covers the problem, change, scope, and verification. The problem is that a local speech model stays in memory until its idle timeout, so users need …
Full details: Title check
Explanation
The title "feat(voice): add a manual speech model unload action" matches the main change: a manual Unload now action that releases the speech model from memory. It is a conventional commit title in plain language and names the feature and its area (voice).
Full details: Description check
Explanation
The description follows the repository template and covers the problem, change, scope, and verification. The problem is that a local speech model stays in memory until its idle timeout, so users need an on-demand release. The change adds an Unload now action under Settings → Voice → Advanced that disposes the worker through the existing path, keeps the model downloaded and selected, and reloads it on the next transcription. Scope states this is a focused feature from a vouched contributor. Verification lists the test commands and results, a manual Windows test with a live stream and busy rejection, a DPoP check on a second environment, and before/after screenshots. The Scope section does not link an issue, and the template says the project accepts bug fixes rather than features, so a maintainer may reject it on scope grounds. The template also asks for a conventional commit title, and the PR title was not provided in the context.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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
size:L100-499 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
1 participant
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
After dictation, a local speech recognition model can stay resident until its idle timeout expires. Voice settings need a way to release that memory on demand.
Change
Add Unload now under Settings → Voice → Advanced. It uses the selected transcription environment's model state and shares the existing worker disposal path. The action is available when the engine has a model loaded and is idle. The model stays downloaded and selected, and the next transcription loads it again.
Scope
A focused feature from a vouched contributor. The control applies to environment-hosted local speech recognition in the shared web and desktop Voice settings.
Verification
vp run check:changed upstream/main --concurrency 1passed with 86 tests and type-checking across 39 packages. The speech service and HTTP tests cover model disposal, preserving the installed selection, reloading on the next run, busy rejection, and permission enforcement.VoiceSettingsPanel.tsx.speech_busy. Closed the stream, clicked Unload now, confirmed the model was still installed and selected, and transcribed the sample again successfully.Before
After
Busy and unloaded states
Active stream
After unload
Implemented with
gpt-6.2-solusing the Codex harness in T3 Code.