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

len_crop issue when train with VCTK dataset #107

Open
junseokoh1 opened this issue Dec 12, 2021 · 2 comments
Open

len_crop issue when train with VCTK dataset #107

junseokoh1 opened this issue Dec 12, 2021 · 2 comments

Comments

@junseokoh1
Copy link

Thanks for your nice project and let us to use.

I guess the pre-trained model that this project give is only trained for validation with only 4 data(p225, p226, p227, p228)

So to reproduce the result of paper, i download VCTK dataset and as paper say i pick 40 speaker (40 speakers for zero-shot train), which is p225 ~ p269 ( maybe 40 ~ 43 speaker, also i change sampling rate to 16k)

When making train.pkl with make_matadata.py there is error with len_crop.

ValueError: 'a' cannot be empty unless no samples are taken

The default value of len_crop is 128, but there is shorter data in VCTK.

I want to know whether you just remove the len_crop part or just use VCTK data which is longer then 128.

Thanks for reading issue.

@junseokoh1
Copy link
Author

junseokoh1 commented Dec 12, 2021

Also there is about 400 utterance for each speaker

At make_metadata.py code, to use all data,
i replace

autovc/make_metadata.py

Lines 42 to 47 in 79dda70

while tmp.shape[0] < len_crop:
idx_alt = np.random.choice(candidates)
tmp = np.load(os.path.join(dirName, speaker, fileList[idx_alt]))
candidates = np.delete(candidates, np.argwhere(candidates==idx_alt))
left = np.random.randint(0, tmp.shape[0]-len_crop)
melsp = torch.from_numpy(tmp[np.newaxis, left:left+len_crop, :]).cuda()

to
melsp = torch.from_numpy(tmp[np.newaxis, :, :]).cuda()

@auspicious3000
Copy link
Owner

You could just skip the shorter utterances.

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

No branches or pull requests

2 participants