Repository navigation
Android: voice mode is a control, and the only time the mic listens (#341) - #351
Merged
Merged
Conversation
…tens (#341) Red first: - VoiceInteractionManager: voice mode on/off; off, nothing said is used; the wake word starts an interaction in a new conversation; anything else is ignored, never dictation; the 30-second window opens once the reply is done and talking holds it shut. - voiceBarPhase: one state at a time, in the desktop's order. - AlwaysListenRemoval: the old setting leaves the store in a migration; voice mode lives under the desktop's key. - ChatViewModel: the control turns voice mode on and off and remembers it; turning it off says the mic is off; an interaction opens a new conversation on a marker. - VoiceBar (instrumented): the design's copy, problems and their fixes, End voice mode in every state, the top-bar control and its dot, the new-conversation marker. The countdown and its test go: the design has none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
…arts (#341) Red first: an interaction starting (voice mode heard the wake word) opens the chat; a transcript by itself opens nothing. The strip used to match transcripts itself. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
…ervice (#341) Red first: turning voice mode on without RECORD_AUDIO must show "access is off" and start nothing, since a microphone foreground service may not start without it; coming back with access allowed tries again. The top-bar dot is said as well as drawn ("Needs attention"). The e2e base and a persona test move to the voice mode API. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
…tens (#341) The desktop's model (#253) and section 3 of the Claude Design mockup "Kurisu - Voice Mode v1": - A top-bar button (and the Chats strip) turns voice mode on and off; the device remembers it under the desktop's key. The service records only in voice mode. "Always listen" is gone, deleted from the store by a DataStore migration, and so is dictation. - The wake word starts an interaction only in voice mode; each is a new conversation, opened on a marker that points to Chats. - The voice bar replaces the composer: one state at a time (voiceBarPhase), what was last said, a top line that drains over the 30-second window (no countdown), problems with their fix, and End voice mode in every state; a snackbar after ending. - Talking holds the window shut; it reopens full. - Without mic access the service is not started (Android 14+ refuses a microphone foreground service without it); the bar says access is off and the chat retries on resume. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
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.
Closes #341
The Android half of the Claude Design mockup "Kurisu - Voice Mode v1" (section 3), and the desktop's voice model (#253) with the same words: voice mode, the wake word, an interaction.
The model
kurisu_voice_mode, the desktop's key). It is the only time the mic listens:CoreServicerecords only in voice mode (ACTION_SET_VOICE_MODE,ACTION_RETRY_MIC), and with it off nothing said is used.AlwaysListenRemoval, a DataStore migration, deleteskurisu_asr_always_listenfrom the store rather than leaving it unread. Dictation is gone: speech without the wake word is ignored and never lands in the composer.newConversation.CoreState.startNewInteractionclears the chat, the persona's cached conversation is forgotten as/cleardoes, and the transcript opens on a marker ("New conversation — You said “Kurisu” at 7:42 PM. The last one is in Chats.") that stays with the new conversation once the server creates it. The Chats screen opens the chat when an interaction starts, where it used to match raw transcripts itself.setUserTalking, from the VAD's start of speech until what was said is transcribed), and it reopens full.The UI (section 3)
VoiceBar), in place of the composer with the keyboard hidden. One state at a time fromvoiceBarPhase, in the desktop's order:secondsUntilare gone.Found on the way
RECORD_AUDIOwould start a microphone foreground service without the permission, which Android 14+ refuses with aSecurityException.CoreService.requestVoiceModechecks first. Without access, the bar says "Microphone access is off" and the service is not touched. The chat retries when it comes back to the foreground (onResume), e.g. from Android settings.LocalContentColor. Found in the emulator screenshots.Tests
Written first (
61e963c,d8fcb64, and the permission case), red before the implementation:VoiceInteractionManagerTest(16, rewritten): voice mode on and off; off, nothing is used; the wake word starts an interaction in a new conversation; no dictation; the window opens only after the reply, and talking holds it.VoiceBarPhaseTest(8),AlwaysListenRemovalTest(3).ChatViewModelVoiceModeTest(5): the control and its memory, the off notice, the new conversation's marker, and no mic access.ConversationsViewModelTest: an interaction opens the chat; a transcript alone does not.VoiceBarTest(instrumented, 14): the design's copy for every state, each problem's action, End voice mode in every state, the top-bar control and its dot, the marker.ChatInputTestloses its two voice cases, since the bar is no longer inside the composer.Locally:
testDevDebugUnitTestgreen;VoiceBarTest+ChatInputTestgreen on thethesysAPI 35 emulator. All twenty states were captured in light and dark and checked against the mockup.Not covered
CLAUDE.mdsays. No emulator test drives speech.docs/screens.md's screenshots predate this and still show the old strip; the text says so.🤖 Generated with Claude Code
https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv