chore: update cactus to v1.11 with timestamp support#4537
chore: update cactus to v1.11 with timestamp support#4537devin-ai-integration[bot] wants to merge 9 commits intomainfrom
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
2 similar comments
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
1 similar comment
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
- Update cactus-sys dependency to v1.11 (rev a5acad3) - Add StreamSegment struct with start/end/text fields to StreamResult - Remove confirmation_threshold from TranscribeOptions (removed upstream) - Remove NoTimestamps whisper token (upstream now enables timestamps) - Refactor streaming session to use real segment timestamps from cactus via segment_timing_from_result() helper with fallback to buffer_duration_ms - Track last_segments in ChannelState for segment-aware timing Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
With cactus v1.11's segment-based confirmation (replacing threshold-based), more audio chunks are needed before segments stabilize and get confirmed. Increase from 10 to 30 chunks to give the new algorithm enough data. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
Cactus v1.11 still uses <|ns|> (notimestamps) in its own prompts. The segment-level timestamps are provided separately by the engine; the prompt token prevents the model from generating timestamp text tokens which causes degenerate loops during streaming. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
- Remove tauri-plugin-apple-contact and tauri-plugin-pdf stub entries from Cargo.lock (local workarounds that should not be committed) - Remove unused last_segments field from ChannelState (stored but never read) Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
The FFI segment timestamps use cactus-internal cumulative time which may diverge from the session's audio_offset tracking. Keep using buffer_duration_ms for timing consistency with existing session logic. Add doc comment explaining the reasoning. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
22db268 to
8c42717
Compare
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 10. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
chore: update cactus to v1.11 with timestamp support
Summary
Updates
cactus-sysdependency to v1.11 (a5acad3) and adapts the Rust wrapper and streaming transcription service to the new API:cactus-sysrevf8b714c→a5acad3StreamSegment { start: f32, end: f32, text: String }added toStreamResult— these are word-level timestamps (not sentence-level)confirmation_thresholdfromTranscribeOptions(removed upstream; v1.11 uses segment comparison for confirmation)segment_timing_from_result()helper. Intentionally does not use cactus segment timestamps for session timing because the FFI returns timestamps in cactus-internal cumulative time which can diverge from the session'saudio_offsettracking. Falls back tobuffer_duration_ms/ elapsed audio time. Word-level segments are still exposed inStreamResultfor downstream consumers.CloseStream— the worker thread usedblocking_recv()which never unblocked becauseTranscriptionSessionheld the original audio sender. Worker now usestry_recv()with periodic cancellation checks. Session cancels transcription tokens onStopReceivingInputand callshandle_finalizeto flush pending text before sending terminal metadata.test_stream_transcriberchunk count increased 10 → 30 for v1.11's segment-based confirmationUpdates since last revision
<|notimestamps|>in whisper prompt — cactus v1.11 still uses<|ns|>internally and removing it caused the model to enter degenerate token loops during streamingtauri-plugin-apple-contact/tauri-plugin-pdfentries fromCargo.locklast_segmentsfield fromChannelState(was stored but never read)segment_timing_from_resultto avoid cactus segment timestamps due to coordinate system divergence (documented in code comment)blocking_recv()→ cancellation-awaretry_recv()loop; session now cancels tokens + callshandle_finalizeonStopReceivingInputReview & Testing Checklist for Human
try_recv()with a 5ms sleep. Verify that (1) cancellation while the worker is mid-process_f32correctly lets it finish the current chunk before exiting, and (2) thestop()call (which flushes remaining unconfirmed text) is reached when the worker exits via cancellation from the idle/recv path vs the mid-processing path.handle_finalizeon clean exit: NEW BEHAVIOR — whenCloseStreamis received, the session now flushes any pending unconfirmed text as a finalResultsmessage before the terminalMetadatamessage. Previously this text was silently dropped. Confirm this is the desired behavior and doesn't break clients expecting the old behavior.segment_timing_from_resultdeliberately ignoresresult.segments[*].start/endfor session timing to avoid coordinate system drift. Verify this is the correct trade-off (precision vs. consistency). Segments are still exposed inStreamResultfor downstream word-level timestamp consumers.confirmation_thresholdwas removed fromTranscribeOptionsandStreamSegment/segmentswere added toStreamResult. Verify no other consumers rely on the removed field or break on the new field.Notes
crates/transcribe-cactus/src/service/batch/response.rs) were intentionally not modified — the cactus batch FFI (cactus_transcribe) does not return segment-level text timestamps.CloseStreamacknowledgment by up to 5ms.Requested by: @yujonglee
Link to Devin Session