镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(grok-voice): release microphone capture after dictation - #673

Open
rudycelekli wants to merge 2 commits into
cursor:mainfrom
rudycelekli:fix/dictation-release-microphone-20261016
Open

rudycelekli wants to merge 2 commits into
cursor:mainfrom
rudycelekli:fix/dictation-release-microphone-20261016

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The batch dictation client stops its MediaRecorder but never stops the microphone MediaStream tracks. Recording completion therefore leaves capture active, including while a slow or failed transcription upload is pending.

Release all tracks in the dedicated recording stream when onstop runs, before any network await. Explicitly document ownership so an app adapting the example does not shut down a shared voice capture graph. Recorded Blob contents are preserved.

Validation: Node 24 executes the actual TypeScript client snippet with deterministic MediaRecorder/track stand-ins. Unchanged base: two resource-lifetime failures and one successful-transcription control passes. Fixed: all three pass, including pending-upload teardown and network rejection. git diff --check passes. No microphone, vendor account, or live API calls were used.

The success fixture uses a native HTTP Response so the regression suite also composes with #674's response-status handling.


Note

Low Risk
Documentation and test-only changes to the dictation skill example; no production runtime paths modified.

Overview
Fixes a microphone leak in the batch dictation client example in add-dictation/SKILL.md: on MediaRecorder stop, the sample now stops every track on the recording stream immediately, before the /api/dictation upload, because MediaRecorder.stop() alone does not release capture.

The comment clarifies that stream should be a dedicated mic stream for that recording so integrators do not tear down a shared voice graph.

Adds dictation-capture.test.cjs, which runs the documented TypeScript snippet in Node with mocked MediaRecorder/tracks and asserts tracks are released on success, on pending upload, and on failed fetch, while the recorded blob and transcription insert still work.

Reviewed by Cursor Bugbot for commit 677c893. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
@rudycelekli
rudycelekli force-pushed the fix/dictation-release-microphone-20261016 branch from 677c893 to 953134c Compare October 24, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant