fix: make long GLM-ASR dictation recoverable and resilient - #71
Open
YidaHu wants to merge 1 commit into
Open
Conversation
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.
Summary
This PR improves long-form dictation reliability for GLM-ASR and makes failed transcription attempts recoverable.
Changes
latest.wav/latest.jsonhelpers for recovery.Why
GLM-ASR rejects audio longer than its provider-side request duration limit. Before this change, longer dictation could fail after recording, and the original audio was not retained for retry or recovery.
With this PR, long dictation is split into provider-safe requests, and the original recording is preserved locally before transcription starts.
Validation
cargo testnpm testPrivacy
Recorded audio is saved only to the user's local app support directory for recovery. This PR does not add telemetry or upload recordings anywhere other than the configured STT provider request path.