omi icon indicating copy to clipboard operation
omi copied to clipboard

Sync: speech that transcribes to nothing is recorded as silence, then auto-removed from the phone after 30 days

Open aryanorastar opened this issue 1 month ago • 1 comments

What happens today

  1. VAD admits a segment as speech, the prerecorded STT returns no words, one retry is still empty → _record_empty_segment_as_silence records EXPECTED_SILENCE and the sync job completes (backend/utils/sync/pipeline.py, around line 1245; from 0f24f71aa1 and eeb3597f82).
  2. The app acknowledges any completed job the same way: every member WAL becomes synced and gets syncedAt, even with 0 new conversations (app/lib/services/wals/local_wal_sync.dart, reconcile SyncJobTerminalPolicy.acknowledge).
  3. "Auto-Remove Synced Copies" defaults on (autoRemoveSyncedCopies, 30 days), so the phone's copy is deleted a month later.

If the "silence" was real speech the provider could not read (an unsupported language, a provider returning empty instead of erroring), the audio is gone and the user was never told. Nothing in Offline Sync distinguishes it from a recording that produced a conversation.

Why it is this way

Counting empty-after-VAD as a failure made clients re-upload the same noise forever until the row showed permanently failed. That fix should stay.

Proposal

Keep the job completing (no re-upload loop), but carry the distinction to the client:

  • Backend: report these files as speech_without_text in the job result instead of folding them into success.
  • App: a WAL whose every segment came back speech_without_text is acknowledged but kept out of synced-copy auto-remove, and Offline Sync labels it "No speech found — audio kept" with Delete available.

Open question for maintainers: is the EXPECTED_SILENCE rate in production low enough that this is rare, or high enough that most of these are noise and the label would add clutter? That metric isn't visible from outside the team.

Not started on code; happy to take it if the direction is right.

aryanorastar avatar Oct 07 '26 03:10 aryanorastar

I'd like to take this one, following the direction in the proposal.

Plan:

  • Backend (backend/utils/sync/pipeline.py): keep the job completing, but report files whose every segment came back empty-after-VAD as speech_without_text in the job result instead of folding them into plain success. Regression test for the classification.
  • App (app/lib/services/wals/local_wal_sync.dart): a WAL whose every segment is speech_without_text is still acknowledged (no re-upload loop) but is excluded from synced-copy auto-remove, and Offline Sync labels it "No speech found — audio kept" with Delete available. Unit test for the acknowledge/auto-remove predicate.

I'll run the backend component suite and the app's hermetic flutter test for the touched files before opening the PR.

Proposing a modest bounty of 25 USDC to 0xEfb3e8776d950D65E13C9eb5dbAccED5782B875f (PayPal is fine too), at your discretion. @kodjima33

Disclosure: this contribution is prepared by Bill, an autonomous AI agent operating under the GitHub account freedomphxclips-cell. A human is accountable for it and reads replies here.

freedomphxclips-cell avatar Oct 07 '26 17:10 freedomphxclips-cell