omi icon indicating copy to clipboard operation
omi copied to clipboard

fix double recording when both device and macOS app is on ($100)

Open aaravgarg opened this issue 1 year ago • 22 comments

Image

aaravgarg avatar Oct 17 '25 22:10 aaravgarg

@aaravgarg can I work on this issue ?

rishi-jat avatar Nov 01 '25 23:11 rishi-jat

@aaravgarg ??

rishi-jat avatar Nov 13 '25 00:11 rishi-jat

@aaravgarg ??

yeah, sure. whats ur plan of action? feel free to submit a PR

aaravgarg avatar Nov 14 '25 00:11 aaravgarg

You have two options here:

  • hardware device should send data only to one of the connected devices (macOS or another). And it can be specified in the settings (which has a priority.
  • send same UUID along with the data on both devices, and when they are saved on the backend, they are merged.

seriyvolk83 avatar Nov 26 '25 14:11 seriyvolk83

you can add a state variable or flag, for example if the device is recording, macOS will check the state before trying to start recording. like some sort of device priority

akcode24 avatar Nov 27 '25 19:11 akcode24

@aaravgarg @seriyvolk83 @akcode24 whenever you have a moment, please take a look at PR #3537. Thanks!

rishi-jat avatar Nov 28 '25 09:11 rishi-jat

@aaravgarg can you please have a look to my PR ? Thanks!

rishi-jat avatar Dec 02 '25 12:12 rishi-jat

pls convince me why this issue should be the issue ? by the way i don't think this one should be the issue, so won't fix is the way.

beastoin avatar Dec 03 '25 11:12 beastoin

pls convince me why this issue should be the issue ? by the way i don't think this one should be the issue, so won't fix is the way.

Image

aaravgarg avatar Dec 04 '25 02:12 aaravgarg

Project board cleanup: this issue is marked In progress on the project board. @aaravgarg — is this still actively being worked on? If not, we'll move it to Someday.

beastoin avatar Feb 27 '26 03:02 beastoin

Respectfully this requires hardware to properly test

jessechejieh avatar May 10 '26 08:05 jessechejieh

https://github.com/orgs/BasedHardware/projects/1/views/7

jessechejieh avatar May 10 '26 09:05 jessechejieh

/attempt #3244

I will reproduce the double-recording path when both the device and macOS app capture sources are active, add a focused source de-duplication/guard fix, and include the narrowest tests or manual verification notes the repo supports.

NAEL592 avatar May 22 '26 00:05 NAEL592

/attempt #3244

Plan: first check whether the double-recording path can be reproduced without physical hardware. If it can, I will isolate the app/device recording state transition and submit a small PR with clear verification steps; if physical hardware is required, I will stop rather than guessing.

18166714330cl-maker avatar May 31 '26 10:05 18166714330cl-maker

I'd like to take a careful pass at this, but I don't want to repeat the closed local-toggle approaches from #3537 / #4352 / #6353.

From current main, the old Flutter capture_provider.dart path used by #6353 no longer looks like the right implementation surface. macOS capture now appears to run through desktop/macos/Desktop/Sources/AppState.swift:

  • mic + system audio are coordinated by reconcileCapture() with captureGateInFlight / captureReconcilePending;
  • system audio starts through startSystemAudioCaptureIfNeeded();
  • Omi BLE audio starts through startBleAudioCapture();
  • a simple “block one local capture mode when the other is active” does not match the earlier maintainer feedback that multi-device recording should be handled, not just toggled off.

Before I open a PR, can a maintainer confirm the intended direction?

  1. Desktop-side gate: prevent the macOS app from creating a second backend recording while an Omi device / phone recording is already active, if there is a reliable device-active signal available to desktop.
  2. Backend / session reconciliation: propagate or use a stable device/session/recording key so simultaneous phone + macOS streams are merged/deduped rather than saved as duplicate conversations.

I can cover the chosen path with focused unit tests around the state/reconciliation logic. I won't claim full hardware validation unless I can verify with a physical Omi device + macOS path.

leo1987820 avatar Jun 28 '26 12:06 leo1987820

I traced the current architecture before starting another implementation, because the three closed approaches all enforced local mutual exclusion and maintainers explicitly said multi-device recording should remain supported.

Current main appears to make the duplication structural: the macOS app opens an identified /v4/listen stream with its own client/backend conversation id, while the Omi device path arrives through a separate app/session. The backend recording-session model is intentionally 1:1 with a conversation, so two active sources for the same user naturally persist two conversations/transcript streams.

Could you confirm which acceptance target you want for this bounty?

  1. Multi-stream fan-in: introduce a shared capture/conversation-group identity so phone/device and macOS sessions append to one conversation while preserving per-device provenance; or
  2. Post-ingest reconciliation: keep separate sessions but detect overlapping near-identical transcript segments and converge them before finalization.

I would favor (1): deterministic grouping is testable and avoids fuzzy text deduplication. If that matches the intended direction, I can scope the protocol/backend change plus unit/E2E coverage without disabling either source.

LerkiaLiang avatar Jul 16 '26 10:07 LerkiaLiang

I'm interested in contributing an AI-assisted fix for the advertised $100 bounty. Before starting a competing implementation, could a maintainer confirm that the bounty is still available and which acceptance target from the discussion above is preferred for simultaneous macOS and device recording?

I can work on the software implementation and regression tests, but I don't currently have Omi hardware and a macOS device available for end-to-end validation. Would automated tests plus maintainer hardware validation be acceptable? I'd proceed with a focused PR once the scope and current reward terms are confirmed.

AceeEcho avatar Sep 08 '26 05:09 AceeEcho

I’d like to take a focused pass on this advertised US$100 bounty, if it is still available.

The closed attempts show that a local “disable one source” guard is not the intended direction, and the discussion points toward preserving simultaneous device + macOS capture while preventing duplicate transcription. Before I implement, could a maintainer confirm:

  • the accepted target is shared-session/fan-in or another backend/session reconciliation approach, rather than blocking one capture source;
  • whether a software change with hermetic regression tests plus maintainer hardware validation is acceptable (I do not have Omi hardware available);
  • that the US$100 reward is still active and payable through the documented private PayPal process after a merged PR.

I will keep the scope to the confirmed path and won’t start a competing implementation until the target is confirmed.

lazzyms avatar Sep 08 '26 21:09 lazzyms

I found a concrete constraint while investigating #3244 against e0a7ada: the existing sync dedupe helper drops an incoming segment when its time range matches, before comparing the words. A local diagnostic using the real helper passes two synthetic segments with identical time ranges and different words: the incoming list becomes empty, and an assertion that the different incoming words survive fails. This means it cannot safely be reused unchanged across independent sources. This is a limitation of that proposed reuse, not a claim that #3244 currently executes that path. The manual merge serializes all source transcripts; when recordings overlap, it shifts the second transcript after the first rather than aligning or deduplicating it.

Given #5388's requirement to keep different simultaneous recordings separate, is an explicit capture-group identifier carried by both clients acceptable for #3244, or must the backend infer duplicate recordings without client coordination? That determines whether the fix should coordinate capture identity or reconcile completed recordings while preserving both audio sources and unmatched speech.

This investigation is AI-assisted through CodeGraph with independent test review. The evidence is from synthetic production-helper tests; two-device/end-to-end validation has not been performed.

MushinNakamoto avatar Sep 09 '26 00:09 MushinNakamoto

Hi — I am evaluating this paid issue in an AI-assisted technical workflow with the authorization of this GitHub account owner. Before starting implementation, could you confirm two points?

  1. Is the remaining defect believed to be in the macOS capture/deduplication path, rather than device firmware?
  2. Would a focused PR with a software-only reproduction and regression test be eligible if final hardware validation is performed by a maintainer? I do not currently have Omi hardware and do not want to claim work that cannot be validated responsibly.

I have not claimed the bounty or started a solution. If contributor-side hardware validation is required, I will leave this for someone with the device. Thank you.

amyelchristian avatar Sep 10 '26 07:09 amyelchristian