Repository navigation
feat: answers wait while you dictate, then the voice picks up where it stopped - #437
Merged
Merged
Conversation
Each chunk carries the index of its sentence in its line. `say` returns the line id, and `say(sentences:)` takes text that is already split. `pause()` stops everything and returns the line and the first sentence not heard in full. `onLineDone` reports a line once it has left, so a line that fails to synthesize does not leave the queue waiting forever. No caller uses them yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]>
…t stopped The hotkey now holds the voice instead of dropping it. The answer that was playing goes back to the front of the queue. When the recording ends, the queue plays in order and the held answer resumes at the sentence it stopped on. Answers, notifications, permission requests and questions go through `VoiceQueue`. Progress lines do not: they are dropped while the voice is held or an answer plays. The session's name is said as a line of its own, so it never moves a resume index. `VoiceQueue.hold` now counts `stoppedAt` in `remaining`, the way Speaker counts the line it was given. A 0.5 s timer releases the dictation hold at the first tick where nothing records, so a press that never starts a recording does not leave the voice held. `whenFree` and its 10-minute limit are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]>
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 10, 2026
znat
added a commit
that referenced
this pull request
Nov 10, 2026
* refactor: an answer queue for the coding agents' voice (#436) VoiceQueue holds the answer playing, the answers waiting and the last 10 heard. A hold puts the playing answer back in front, at the sentence it stopped on. It plays only when no hold is on: the Pause button and a dictation are two separate holds. A new prompt drops that session's answers only. Nothing calls it yet. The cases are a queue: section in tests/claude-voice-cases.yaml, scored by --claude-voice-test. Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * feat: answers wait while you dictate, then the voice picks up where it stopped (#437) * refactor: Speaker knows which sentence plays, and can pause Each chunk carries the index of its sentence in its line. `say` returns the line id, and `say(sentences:)` takes text that is already split. `pause()` stops everything and returns the line and the first sentence not heard in full. `onLineDone` reports a line once it has left, so a line that fails to synthesize does not leave the queue waiting forever. No caller uses them yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: answers wait while you dictate, then the voice picks up where it stopped The hotkey now holds the voice instead of dropping it. The answer that was playing goes back to the front of the queue. When the recording ends, the queue plays in order and the held answer resumes at the sentence it stopped on. Answers, notifications, permission requests and questions go through `VoiceQueue`. Progress lines do not: they are dropped while the voice is held or an answer plays. The session's name is said as a line of its own, so it never moves a resume index. `VoiceQueue.hold` now counts `stoppedAt` in `remaining`, the way Speaker counts the line it was given. A 0.5 s timer releases the dictation hold at the first tick where nothing records, so a press that never starts a recording does not leave the voice held. `whenFree` and its 10-minute limit are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * fix: the end of a dictation releases the voice even with a menu open Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * feat: the pill shows which session speaks, with Pause and Resume (#438) * feat: one function decides what the voice pill says `VoicePill.of` turns the queue into the pill's state: the session that speaks with "2 waiting" or "1 of 3", or "Voice paused" with what waits. A dictation hold alone shows nothing. `VoiceQueue.resumed` marks a run that began when a hold let go of a list, so "1 of 3" shows only then. The new `pill:` cases in tests/claude-voice-cases.yaml score it through `--claude-voice-test`. Nothing draws it yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: the pill shows which session speaks, with Pause and Resume The pill now shows during every answer, notification and question, not only when the session's window is out of sight. It has a Pause button, and "Go to session" while the window is out of sight. Paused, it says "Voice paused", counts what waits, and stays until Resume. Progress lines never raise it. `ClaudeVoice.onVoicePill` replaces `onPill`. It is sent once the queue settles after a change, and each second while there is a state, so the pill comes back after a dictation. `PillState.voice` replaces `.session` and keeps its priority: it shows only on a free pill. `--panels speaking` and `--panels paused` replace `--panels session`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * feat: pause the voice from the menu bar or with ⌃⌥P, for an hour or until tomorrow (#439) * refactor: each hotkey's events go to the manager that registered it The Carbon handler fired for any hotkey and returned noErr, so a second manager's handler swallowed the first one's presses. Each manager now has its own id, and passes on an event that is not its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: the voice pauses for an hour, until tomorrow or until you resume, as a pure model VoicePause holds the deadline: tomorrow is the next 8:00 strictly after now. VoiceMenu gives the Voice section's rows for a state, and which row the pause shortcut does. Scored by pause_until, pause_restored and pause_menu in tests/claude-voice-cases.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: pause the voice from the menu bar or with ⌃⌥P, for an hour or until tomorrow The status menu gets a Voice section: three ways to pause, or Resume with until when and how many answers wait. The count also shows next to the menu bar icon. A timed pause ends on a one-shot timer, checked again on wake. The pause is saved in the app's defaults, so it survives a relaunch. voice.pause_key, default ⌃⌥P, toggles it; none turns it off. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * docs: macOS does not refuse a pause shortcut another app holds Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * feat: the voice pauses on its own while another app uses the mic (#440) * feat: the voice holds its answers while another app uses the mic A watcher reads Core Audio's process objects. Another app that keeps the mic open for 2 seconds holds the voice; 5 seconds closed ends the call. ParrotFlow's own recording and the other build's do not count. The menu says "Paused · Zoom is using the mic" and Resume plays during the call. A call that ends with answers waiting leaves the voice paused until you resume. On by default; voice.pause_during_calls turns it off. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: the pill says which app holds the voice, and asks after the call While a call holds answers, the pill says "Voice paused · Zoom is using the mic" with Resume. When the call ends with answers waiting, it says "Call over · 3 waiting" with Resume and Not now. Not now keeps the voice paused and takes the pill away; the menu bar icon still counts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * fix: Siri listening is not a call, and the call-over pill goes when nothing waits A process with no app, or a background-only app, no longer counts as a call: com.apple.CoreSpeech held the voice while nobody was on a call. FaceTime's call service stays in a table. After a call, a new prompt that drops the last waiting line ends the call's pause, so the pill no longer says "Call over · 0 waiting". Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * feat: see the last answers in the menu and play them again (#441) * feat: the voice queue plays an answer on request, through a pause A heard answer can be asked for again, and a waiting one now. It goes first and plays through a pause or a call, not through a dictation. The answer it cuts off goes back to the front at its sentence. A pause or a call takes the ask back. A replay is not added to the heard list twice. Heard answers keep their audio, newest first, up to about 30 MB of samples in all. The Answers submenu's rows come from the same queue. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * feat: see the last answers in the menu and play them again The Voice section has an Answers submenu: the waiting answers in play order, then the last 10 heard. Each row has Play now or Play again, and Go to session when the window is known. A replay of an answer said in one go plays its kept audio, so the remote voice is not called again. Speaker reports each sentence made whole; a sentence a voice broke on leaves the answer with no audio, and its replay is made again from the text. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> * fix: answer rows line up with the other Voice rows Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y Signed-off-by: Nathan Zylbersztejn <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Signed-off-by: Nathan Zylbersztejn <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The hotkey no longer drops what the coding agents' voice was saying. It holds the voice. The answer that was playing goes back to the front of the queue, and answers that arrive during the dictation join the end. When the recording ends, the queue plays in order and the held answer resumes at the sentence it stopped on. Progress lines that come during a dictation are dropped. A new prompt in a session still drops that session's answers. There is no setting and no Pause button yet.
ClaudeVoice.pause()/resume()exist for PRs 3 and 4.Needs a live check (steps below): audio cannot be tested by an agent. The cases cover the queue rules. They do not cover which sentence
Speaker.pause()reports.Live check: dictate over an answer, then read four log lines
Use the dev build. Read
claude voice:lines in the app log.claude voice: held (dictation), <project> back in front at sentence 2 of Nclaude voice: released (dictation), 1 waitingclaude voice: resumed <project> at sentence 2 of Nclaude voice: said: <sentence 2 onward>. You hear sentence 2 again from its start.resumedline: the answer starts again from its first sentence. The name is not said again unless another session spoke last or 2 minutes passed with the window out of sight.claude voice: a new prompt dropped 1 of <project>'s linesand no resume.How the queue plays: one pump, three events
ClaudeVoice.enqueueadds answers, notifications, permission requests and urgent lines (AskUserQuestion,ExitPlanMode) toVoiceQueue, then callsplayNext.playNextasksqueue.startNext(). It is nil while a hold is on or an answer plays. Otherwise it drops progress lines, then says the session's name on a Speaker line of its own, thenentry.remainingon a second line. It keeps that line's id inanswerLine.Speaker.onLineDonecallsqueue.finishforanswerLine, thenplayNext. It also fires when a line is dropped, or when none of its sentences could be made. So a line that fails synthesis cannot leave the queue waiting.silence()(hotkey down) callshold(.dictation).holdcallsSpeaker.pause(), which stops everything and returns the line and the first sentence not heard in full: the one playing, else the one being made. That index counts within the line, andVoiceQueue.hold(stoppedAt:)now adds it toentry.resume..dictationat the first tick whereisRecording()is false, then callsplayNext. The first tick comes after the press has opened the microphone. So a press that never starts a recording (a quick tap, a failed start, the permission dialog) ends the hold at once.whenFreeand its 10-minute limit are gone. After the permission dialog, the granted path callssilence()again before it starts recording.queue.takesProgress(no hold, no answer playing) and Speaker is silent.voice.enabledoff clears the queue, the holds and the timer.Why the session's name is its own line
VoiceQueuesplits each answer into sentences and resumes by index. If "Atlas here:" or the reminder were part of the line, every index after it would shift. As a separate Speaker line, a pause during the name maps to no sentence, and the answer resumes where it last began. The name is chosen again at each start by the existingprefix(for:)rule. A resume after a short dictation does not repeat it.The cost: the name is now its own TTS request. Before, it was merged into the first sentence. With a remote voice, that is one more request per named answer, and "Atlas here:" is said as a sentence on its own.
Changes a reviewer might not expect
AskUserQuestion,ExitPlanMode), notifications and permission requests now wait in the queue. Before, a question was a progress line that an answer could drop. Now it plays in order. All of them count inheardandplace, which PR 3's "1 of 3" and PR 6's list will show.VoiceQueue: relative hold, an answer that comes during a dictation, and progress dropped while held or while an answer plays. Two rules live outside it and only the live check covers them: which sentenceSpeaker.pause()reports, andClaudeVoice.holdmapping it to the answer line.Checks run: build, 375 cases, lint, three mutations, make test
swift build -c release: no new warnings in the files touched.scripts/check-claude-voice.sh: 365/365 cases, 10/10 prompt checks. 6 newqueue:cases.stoppedAtfails "a second hold counts from the sentence the answer resumed at";takesProgresswithout the hold check fails 2 progress cases;takesProgresswithout the playing check fails "a progress line while an answer plays is dropped".swiftlint lint --quiet: no new findings (the 4 inSpeaker.swiftwere already there).PARROTFLOW_CONFIG_DIR=<scratch> make test: every check passed.--committed, base 69032d6): 0 findings on the 7 files.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jptb12hNR5fNp7ZEWwqC9y