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

Add resample script #7

Closed
wants to merge 2 commits into from
Closed

Add resample script #7

wants to merge 2 commits into from

Conversation

WeberJulian
Copy link
Contributor

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.

@erogol
Copy link
Member

erogol commented Mar 4, 2021

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 soxi

@WeberJulian
Copy link
Contributor Author

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 ?

@WeberJulian
Copy link
Contributor Author

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)
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok 👍

@erogol
Copy link
Member

erogol commented Mar 4, 2021

There are already sample waves from LJSpeech
https://github.com/coqui-ai/TTS/tree/master/tests/data/ljspeech/wavs

Feel free to use whatever you feel comfortable.

@WeberJulian
Copy link
Contributor Author

When I push on WeberJulian/TTS, my commit are not showing up here. I think this is because it's not a fork anymore.
I'm gonna need to open another PR from a fork of coqui-ai/TTS
image

@WeberJulian WeberJulian closed this Mar 5, 2021
eginhard referenced this pull request in idiap/coqui-ai-TTS Apr 2, 2024
Pin black for consistent outputs
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