You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bounty proposal] fix(app): a too-short speech profile recording is retried 3 times and never shows the "not enough speech" dialog ($25 proposed) #15057
Involves data loss, failed capture, or broken sync/trust
Describe the bug
Since #14514, uploadProfile (app/lib/backend/http/api/speech_profile.dart) throws SpeechProfileUploadException(statusCode), whose toString() is Speech profile upload failed (400). SpeechProfileProvider._isTooShortUploadError still looks for the backend's detail text ("Audio duration is invalid", "Audio is empty") in error.toString(), so it never matches any more.
To Reproduce
Start the speech profile recording and stop with too little speech, so the backend answers 400 "Audio duration is invalid (must be 5-180 seconds)" or "Audio is empty".
Current behavior
The app retries the same upload 3 times and ends with UPLOAD_FAILED instead of showing the "not enough speech" dialog. Analytics records the wrong reason.
Expected behavior
A too-short recording is recognized on the first 400 and the user gets the "not enough speech" dialog, as before #14514.
Additional context
Reproduced with provider tests where the upload throws the new exception with the backend detail: tooShort is false and the upload is retried.
Proposing this as a paid bounty ($25) per the contribution docs, @kodjima33. The fix with tests is ready and I'm opening the PR now.
Activity