Intercept Pebble watchapp dictation into the Index Feed#303
Open
Kaysera wants to merge 4 commits into
Open
Conversation
pass the audio to the Index Feed
- Drop the now-redundant TARGET_WATCHAPP_UUID seed constant now that the allowlist is fully user-editable via the picker; seed defaults to an empty set instead. - STTRouter: guard against empty audio frames and log on divert, matching the existing 3-arg transcribe path's conventions. - Fix styling/consistency nits to match each file's local conventions (property/setter ordering in SettingsViewModel, braced if/else in Preferences, trailing comma in TranscriptionProvider) and make IndexFeedWatchappsDialog public like its sibling dialogs. - Trim KDoc added by this branch that didn't match the surrounding modules' no-class-doc convention.
CLAUDE.md's platform rule requires new audio input sources to conform to the format the Ring pipeline expects (16kHz, PCM_16BIT, mono, raw) rather than relying on the pipeline's per-file sample rate parameter. The watch's native Speex sample rate is whatever the firmware reports and isn't guaranteed to already be 16kHz, so resample it using the same Resampler the phone-mic/ring path already uses in RingSync.kt. Also reword a comment in IndexSettings.kt to avoid the "X, not Y" phrasing CLAUDE.md's comment guidance flags.
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 #264
Summary
When dictation audio arrives from a user-selected Pebble watchapp, the phone skips
normal transcription and instead feeds the decoded audio into the same pipeline
phone-mic recordings already use to become Index ring feed items. The watch still
gets its normal end-of-session ack, just with no transcript. Which watchapps are
selected is a user-editable set, not a compile-time constant.
UI
Index Settings (debug section) gains an "Index Feed Watchapps" row showing the
current selection count. Tapping it opens a checkbox dialog of installed watchapps
(from
LibPebble.getLocker()); changes save immediately. A watchapp that's sincebeen uninstalled stays selected instead of dropping out, so switching between debug
and release builds of the same app doesn't require re-picking it. No watch connected
→ empty-state message instead of a blank list.
Design notes
PebbleDictationSinklives in:utilso:pebble(decoder) and:experimental(ring feed) stay sibling modules with no new dependency edge either way.
RingSync'sResampler) beforeingestion, since the watch's native Speex rate isn't guaranteed to be 16kHz and
the Ring pipeline expects that format.
Testing
./gradlew :composeApp:assembleDebug+ existing unit tests pass.a debug build of
pebble-index-note(which is a demo app I coded just for the purpose of this PR). Produces a real Index feed item that is later classified by the intent model and audio that can be listened.Known follow-ups
resample/byte-conversion logic).
PEBBLE_FW_TRANSCRIPTION_TIMEOUT(~15s).AI Usage
Claude has been used to help me understand the codebase and program the feature in a way that is coherent with the existing code. I'm a Python programmer and it's been 5 years since I last touched Kotlin so I have needed some help there. However, the design decisions and structure are mine. If they clash with the app design, are too complex and difficult to maintain, or introduce too much noise, I'm willing to work on this simplifying the feature and aligning it to the app as much as I can.