Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Allow re-downloading voice typing models on URL change and error #11557

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Dec 23, 2024

Summary

This pull request:

  • Allows users to download the updated model version when the voice typing URL changes.
    • The user is prompted before deleting the existing model and downloading from the voice typing URL.
  • Allows users to redownload the voice typing model when an exception is thrown during voice typing.
    • This handles the case where the user downloaded a corrupted model (e.g. if the data on the server was incorrect).

Testing plan

Android 13:

  1. Start with a voice typing model downloaded from a custom URL.
  2. Open the voice typing dialog.
  3. Verify that it's possible to use voice typing.
  4. Verify that a "Download updated model" button is visible.
  5. Switch voice typing providers.
  6. Verify that the "Download updated model" button is not visible.
  7. Switch back to the original provider.
  8. Open the voice typing dialog and click "Download updated model".
  9. Click OK in the "Delete model and re-download?" confirmation dialog.
  10. Verify that the model re-downloads.

To-do:

  • Automated testing?

@personalizedrefrigerator personalizedrefrigerator changed the title Android: Allow re-downloading voice typing models on error Android: Allow re-downloading voice typing models on URL change and error Dec 23, 2024
@personalizedrefrigerator personalizedrefrigerator marked this pull request as ready for review January 6, 2025 14:12
Comment on lines +205 to +207
const reDownloadButton = <Button onPress={onRequestRedownload}>
{modelIsOutdated ? _('Download updated model') : _('Re-download model')}
</Button>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI is being added for these reasons:

  • If the URL was previously changed by a Joplin user (before this redownload behavior was added).
  • If the user needs to use voice typing now and can't wait for the model to re-download.

@laurent22 laurent22 merged commit bacaf80 into laurent22:dev Jan 6, 2025
7 checks passed
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