Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with sdks/device/go/omidevice/stt/stt.go, especially the whisperBatch methods around Stop() and AppendPCM. Read how the final buffer is flushed and compare the stopped behavior described for the WebSocket engines. Done when appending after Stop() returns an error and does not buffer audio, run Whisper, or invoke onTranscript.
Written by the indexing model from the issue text.
Description
Bug Description
In the Go device SDK (sdks/device/go/omidevice/stt/stt.go), NewWhisper returns a whisperBatch that does not track whether Stop() has been called:
Stop() flushes any remaining buffered bytes and sets w.buf = nil, but leaves whisperBatch open to subsequent AppendPCM calls. If late audio frames (for example an in-flight BLE packet) arrive at AppendPCM after Stop() has returned:
AppendPCMbuffers the audio intow.bufagain.- Once
w.bufreachesw.batch(160,000 bytes, 5 seconds of 16 kHz PCM16),AppendPCMinvokes the Whisper runner and callsonTranscriptfor a session that has already been stopped. - A repeated
Stop()flushes whatever new audio accumulated after the firstStop().
By contrast, the Go SDK's WebSocket engines (Deepgram, Parakeet) close the underlying socket in Stop() so subsequent AppendPCM calls fail with an error, and the Dart, TypeScript, and React Native SDKs' Whisper transcribers all guard their append paths once stopped.
Expected Behavior
Once whisperBatch.Stop() has been called, it should mark the transcriber as stopped before flushing the final buffer, and AppendPCM should refuse audio appended after Stop() with an error instead of buffering, running Whisper, or invoking onTranscript.
- Dominant language
- Python
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 626
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BasedHardware/omi
-
[Bounty proposal] fix(calendar): normalize naive dateTime strings and guard None values in parse_event_times ($50 proposed)Possibly taken @huynhnhatquandongnai-source claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BasedHardware/omi#22636 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bounty proposal] fix(entity-pages): normalize mixed naive, aware, and ISO conversation timestamps ($50 proposed)Possibly taken @huynhnhatquandongnai-source claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
BasedHardware/omi#22620 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bounty proposal] fix(calendar): normalize naive start timestamps and guard malformed start dicts in multi-window sort ($50 proposed)Possibly taken @huynhnhatquandongnai-source claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
BasedHardware/omi#22614 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bounty proposal] fix(memory): normalize mixed naive and aware evidence timestamps when ordering capture devices ($50 proposed)Possibly taken @huynhnhatquandongnai-source claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#22611 · 1 comment ·
Maintainers usually reply within 1 day
-
Python CLI: corrupt compressed responses hide an unknown write outcomePossibly taken @pranav440 claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
BasedHardware/omi#21295 · 1 comment ·
Maintainers usually reply within 1 day
All issues in BasedHardware/omi
Similar issues
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
selimfirat/pysad#379 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#32805 ·
Maintainers usually reply within 1 day
-
fix: [bug description] HTML CVE metric table shows only the last CVE for each productPossibly taken @Chris-wh233 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
ossf/cve-bin-tool#5976 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gke-labs/kube-agents#3615 ·
Maintainers usually reply within 1 day
-
deferred
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day