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

Offen
#1,298 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
65/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Rust
Sterne
3.7k
Forks
349
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
93

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Open-Less/openless

Alle Issues in Open-Less/openless

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.