fix(asr): surface real ASR errors instead of generic message#31
Merged
Conversation
…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.
Owner
|
This branch has conflicts that must be resolved |
Collaborator
Author
resolve conflict with main |
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.
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::Errordidn't break the audio loop, so the session could continue with incomplete input after a provider error.Solution
run_session. When no text is available, report the real error to the UI instead of the generic fallback.AsrEvent::Errorso the session doesn't proceed with partial/wrong text after a provider error.Files changed
koe-core/src/lib.rsTest plan
make buildpasses