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

Fix checking voice files in custom data dirs #367

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ichthyosaurus
Copy link

This fixes piper re-downloading already downloaded models with the --data-dir option. It now checks for every model if it exists in one of the data dirs. It only downloads models if they are actually missing, or if all existing files were invalid.

Without this fix, piper schedules a model file for download if it is missing in any data directory. As "." is always in the list of data dirs, models are re-downloaded if they don't exist in the current working dir. With this fix, it only downloads files that are missing in all data dirs.

This fixes piper redownloading already downloaded models
with the --data-dir option. It now checks for every model
if it exists in one of the data dirs. It only downloads
models if they are actually missing, or if all existing
files were invalid.
@MullPointer
Copy link

MullPointer commented Jan 30, 2024

I had observed the same behaviour and from a read through this pull request looks like it should fix it. Thanks for saving me from having to explain it, @ichthyosaurus.

However, I am not sure that it is a good idea to delete models with incorrect sizes or hashes without user confirmation in case they were custom models or the sizes or hashes listed are wrong. Suggest piper should just put up the warning and continue to check other data dirs.

@ichthyosaurus
Copy link
Author

However, I am not sure that it is a good idea to delete models with incorrect sizes or hashes without user confirmation in case they were custom models or the sizes or hashes listed are wrong. Suggest piper should just put up the warning and continue to check other data dirs.

Thanks, that makes sense. I updated the PR.

@xandark
Copy link

xandark commented Apr 21, 2024

I've run into this exact issue as a new user of piper, which I love regardless of the issue. Seeing as there are no conflicts, is there a reason why this cannot be merged?

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.

3 participants