Repository navigation
Conversation
Plays one of Hex's start sounds when recording is about to begin, off by default, on web and desktop. The controller waits for the cue to finish before capture starts so the sound stays out of the recording and live stream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| audio.removeEventListener("ended", finish); | ||
| resolve(); | ||
| }; | ||
| const limit = setTimeout(finish, CUE_WAIT_LIMIT_MS); |
There was a problem hiding this comment.
🟠 High speech/recordingCue.ts:50
When cue playback is delayed or stalls, playRecordingCue resolves after 1 second while the audio can still play into the recording and live transcription. The timeout only calls finish, which does not stop the audio; pause and reset it on the timeout path before resolving.
- const limit = setTimeout(finish, CUE_WAIT_LIMIT_MS);
+ const limit = setTimeout(() => {
+ audio.pause();
+ audio.currentTime = 0;
+ finish();
+ }, CUE_WAIT_LIMIT_MS);🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/speech/recordingCue.ts around line 50:
When cue playback is delayed or stalls, `playRecordingCue` resolves after 1 second while the audio can still play into the recording and live transcription. The timeout only calls `finish`, which does not stop the audio; pause and reset it on the timeout path before resolving.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — Adds an off-by-default dictation start sound with selectable previews, preserving existing silent recording behavior. The reported playback-timeout issue remains subject to the separate correctness blocking gate. Needs human approval because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
Thanks for this. #33097 makes the same change and is the one being kept. The overlapping #33097 also adds a cue before dictation starts, and it stops playback when the wait expires. That is the deciding difference: this version releases the wait without stopping the sound, so delayed playback can enter the recording. Your off-by-default switch and selectable previews remain useful differences. Those could be proposed on top of the shared cue implementation rather than maintaining a second playback path. Closing as a duplicate. |
Problem
Dictation gives no sound when recording starts, so you have to watch the composer to know it is listening.
Change
Voice settings get an optional Sound cue, off by default, with seven sounds to pick from. Picking a sound or turning the switch on previews it. Available on web and desktop.
The cue plays and finishes before capture begins, so it never lands in the recording or the live stream:
start() prepare transcriber, open microphone + beforeRecord() # web: play cue, wait for it to end (max 1s) recorder.record() state -> recordingMobile does not pass
beforeRecord, so it is unchanged. Retrying saved audio skips this step and stays silent.The sounds are unchanged from Hex. Its MIT license permits reuse with attribution; the notice ships in
apps/web/src/assets/speech-cues/LICENSEand the web and desktop third-party notices.Scope and approval
Split out of #32484 as the review there asked. The model folder restore in that PR is dropped because #34096 already covers it. No maintainer approval for the sound cue is linked yet.
Verification
controller.test.ts: the five-minute-cap case now assertsbeforeRecordruns beforerecorder.record(). It failed before the change and passes after. The file andsettings.test.tspass (87 tests).Created with Claude Opus 5.5 in Claude Code, through T3 Code.