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 colliding dataset cache file names #1994

Merged
merged 2 commits into from
Sep 21, 2022
Merged

Fix colliding dataset cache file names #1994

merged 2 commits into from
Sep 21, 2022

Conversation

Edresson
Copy link
Contributor

No description provided.

@Edresson Edresson requested a review from erogol September 19, 2022 23:22
@@ -34,6 +35,13 @@ def noise_augment_audio(wav):
return wav + (1.0 / 32768.0) * np.random.rand(*wav.shape)


def string2filename(string):
# return re.sub('[^\w_.)( -]', '_', string)
Copy link
Member

Choose a reason for hiding this comment

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

do we need this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to convert the "audio_unique_name" that is something like "ljspeech#wavs/LJ-0001" to a valid file name. I found two good ways to do that. The first uses regular expression and the second is with base64 which looks like the better solution. I kept the re version on the code just in case. Do you want me to remove this comment line?

Copy link
Member

Choose a reason for hiding this comment

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

yeah I was about the comment line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah, I removed it :).

TTS/tts/datasets/dataset.py Show resolved Hide resolved
@Edresson Edresson requested a review from erogol September 20, 2022 16:51
@erogol erogol merged commit d6ad9a0 into dev Sep 21, 2022
@erogol erogol deleted the fix-ph-cache branch September 21, 2022 10:54
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