Skip to content

[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

Closed

Description

@singhharsh1708

Product impact

  • Primary loop layer: Understand
  • 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

  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions