fix(asr): Whisper/OpenRouter 动态超时 + 全局兜底 15→30s#723
Merged
H-Chris233 merged 2 commits intoJun 21, 2026
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit e1f24b6)Here are some key observations to aid the review process:
|
4d7ea2e to
e1f24b6
Compare
Contributor
|
Persistent review updated to latest commit e1f24b6 |
- COORDINATOR_GLOBAL_TIMEOUT_SECS 从 15 改为 30,为云端 batch ASR 留网络预算 - 新增 whisper_transcribe_timeout(audio_secs):max(30, ceil(audio×0.5)+20) - WhisperBatchASR 新增 buffer_duration_ms() 供 coordinator 计算动态超时 - dictation.rs Whisper 路径从固定 15s 切到动态超时,超时日志包含音频时长 Closes Open-Less#721
- local_qwen_timeout_ceils_partial_seconds: 10.1s 音频原期望 17s,全局常量 提升到 30s 后改为期望 COORDINATOR_GLOBAL_TIMEOUT_SECS - 更新相关注释中的 15→30 - 新增 3 个 whisper_transcribe_timeout 测试:短音频兜底、长音频缩放、ceil
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.
User description
问题
Closes #721
OpenRouter Whisper 长语音被 15s 全局超时硬截断。
方案
双重保险:
改动
3 文件,+32 / −7 行,`cargo check` 通过。
PR Type
Bug fix, Enhancement
Description
Increase global ASR timeout from 15s to 30s
Add dynamic timeout for Whisper/OpenRouter based on audio duration
Log audio duration and timeout for debugging
Add unit tests covering new timeout logic
Diagram Walkthrough
File Walkthrough
whisper.rs
Expose buffer duration for timeout calculationopenless-all/app/src-tauri/src/asr/whisper.rs
buffer_duration_ms()method toWhisperBatchASRto expose audioduration
coordinator.rs
Implement Whisper timeout function and update testsopenless-all/app/src-tauri/src/coordinator.rs
COORDINATOR_GLOBAL_TIMEOUT_SECSfrom 15 to 30whisper_transcribe_timeout()function with formulamax(30,ceil(audio*0.5)+20)local_qwen_timeouttests to align with new global timeoutdictation.rs
Apply dynamic timeout to Whisper/OpenRouter sessionopenless-all/app/src-tauri/src/coordinator/dictation.rs
buffer_duration_ms()andwhisper_transcribe_timeout()for dynamictimeout