-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add resample script #7
Conversation
Can you add a test for this ? For instance, you can create a shell script like this one and check the output sample rate with |
Hum I'm not sure how to do it. Should I add a wave file to the commit as well ? And with the bash script, should I create a folder, add the wav inside, resample and then delete ? |
Also, could I do it in pyton ? Bash isn't my strong suit... |
|
||
if args.output_dir: | ||
print('Recursively copying the input folder...') | ||
shutil.copytree(args.input_dir, args.output_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use distutils.dir_util.copy_tree
instead? Since shutil.copytree
will throw an error if the output_dir already exists, which is a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 👍
There are already sample waves from LJSpeech Feel free to use whatever you feel comfortable. |
Pin black for consistent outputs
Since it seems that many of us have made a script in local to resample a dataset I figured it would be good to have one on the repo.
This one is multithreaded, uses librosa to resample the wav files and can either resample inplace or create a copy of the dataset's directory.