Skip to content

fix(asr): surface real ASR errors instead of generic message#31

Merged
missuo merged 3 commits into
missuo:mainfrom
erning:fix/asr-error-reporting
Mar 29, 2026
Merged

fix(asr): surface real ASR errors instead of generic message#31
missuo merged 3 commits into
missuo:mainfrom
erning:fix/asr-error-reporting

Conversation

@erning

@erning erning commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

ASR runtime errors (auth failure, quota exceeded, stream interruption) were only logged but never shown to the user. When aggregated text was empty, a generic "no speech recognized" masked the real cause. Additionally, AsrEvent::Error didn't break the audio loop, so the session could continue with incomplete input after a provider error.

Solution

  1. Track the last ASR error in run_session. When no text is available, report the real error to the UI instead of the generic fallback.
  2. Break the audio loop on AsrEvent::Error so the session doesn't proceed with partial/wrong text after a provider error.

Files changed

  • koe-core/src/lib.rs

Test plan

  • make build passes
  • Invalid API key shows actual auth error, not "no speech recognized"
  • Normal recording still works when no errors occur

erning added 2 commits March 29, 2026 21:21
…nized'

Send errors, read errors, and provider-reported AsrEvent::Error were
only logged but never shown to the user.  When the aggregated text
was empty, a generic "no speech recognized" masked the actual cause
(auth failure, quota, stream interruption, etc.).

Track the last ASR error and report it to the UI when no text is
available.
Previously AsrEvent::Error only logged the message without breaking
the loop.  If partial interim text already existed, the session would
continue to LLM correction and paste with incomplete input.  Now the
loop exits on error, and the real error is surfaced if no usable text
was collected.
@missuo

missuo commented Mar 29, 2026

Copy link
Copy Markdown
Owner

This branch has conflicts that must be resolved

@erning

erning commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator Author

This branch has conflicts that must be resolved

resolve conflict with main

@missuo missuo merged commit b9d1d88 into missuo:main Mar 29, 2026
@erning erning deleted the fix/asr-error-reporting branch March 30, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants