Cold audio device: 5.3s open latency then 53ms of audio, session fails later with an unrelated error

未关闭
#1,298 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Reproduce the cold-start first-dictation path and inspect the audio-startup and recorder logs alongside the saved WAV duration. Start by tracing audio capture through the point where the WAV is sent to ASR. Done means a capture shorter than about 200 ms fails immediately with a clear message instead of proceeding to ASR and failing later.

由索引模型根据 Issue 内容生成。

描述

Environment: OpenLess 2.0.2-Beta.3+build.20261026-c9f49c60, macOS 27.2 (26B123) arm64, USB audio input device.

Steps
  1. Cold start the app.
  2. First dictation of the session: hold the hotkey and speak for ~6 seconds.
Expected

Either warm the device on hotkey-down before the user starts speaking, or fail fast with a clear "microphone did not start" message.

Actual

The device takes ~5.3 s to open, then the stream is dropped ~70 ms later. The saved WAV is 0.053 s long. That empty file is sent to ASR, which returns 0 characters, and the session fails several seconds later with an unrelated polish error. The user sees nothing at all.

The second press in the same session opened the device in 43 ms, so this is a cold-start path only.

Evidence
[audio-startup] phase=device_selected duration_us=5256253 since_open_us=5256253
[audio-startup] phase=first_raw_pcm since_open_us=5431668
[recorder] cpal Stream dropped (mic released)        # ~70 ms later
saved wav: 1 ch, 16000 Hz, Int16, duration 0.053375 s
[asr] … elapsed_ms=5970 chars=0
Suggestion

If capture yields < ~200 ms of audio, abort immediately instead of calling ASR with an empty file.

主要语言
Rust
星标
3.7k
派生
349
平均合并
1 天 18 小时
30 天内合并 PR
93

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Open-Less/openless 的其他 Issue

查看 Open-Less/openless 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。