This repository was archived by the owner on Aug 11, 2025. It is now read-only.
Open
Conversation
…Rollback to this commit if the config file inputs dont work.
…do some comment cleanup.
cschaefer26
reviewed
Jan 20, 2022
Contributor
cschaefer26
left a comment
There was a problem hiding this comment.
I think the script could be simplified.
| test_metadata_path = cm.valid_metadata_path | ||
| print(f'\nReading metadata from {metadatareader.metadata_path}') | ||
| print(f'\nFound {len(metadatareader.filenames)} lines.') | ||
| def get_short_files(phonemized=False): |
| print(f'\nReading metadata from {metadatareader.metadata_path}') | ||
| print(f'\nFound {len(metadatareader.filenames)} lines.') | ||
| def get_short_files(phonemized=False): | ||
| if not phonemized: |
Contributor
There was a problem hiding this comment.
Suggested change
| if not phonemized: | |
| symbol_list = all_phonemes if phonemized else _alphabet |
| return filter_metadata | ||
|
|
||
|
|
||
| remove_files = pickle.load(open(cm.data_dir / 'under-over_sized_mels.pkl', 'rb')) |
| remove_files = pickle.load(open(cm.data_dir / 'under-over_sized_mels.pkl', 'rb')) | ||
| phonemized_metadata_path = cm.phonemized_metadata_path | ||
| train_metadata_path = cm.train_metadata_path | ||
| test_metadata_path = cm.valid_metadata_path |
Contributor
There was a problem hiding this comment.
inconsistent naming of train and validation
|
|
||
| new_metadata = [f'{k}|{v}\n' for k, v in phonemized_data.items()] | ||
| shuffled_metadata = np.random.permutation(new_metadata) | ||
| train_metadata = shuffled_metadata[0:train_len] |
Contributor
There was a problem hiding this comment.
Suggested change
| train_metadata = shuffled_metadata[0:train_len] | |
| train_metadata = shuffled_metadata[0:-test_len] |
Contributor
There was a problem hiding this comment.
I think its safer to just use the test_len, also it saves a couple of lines
| file.writelines(test_metadata) | ||
|
|
||
| # some checks | ||
| assert metadata_len == len(set(list(phonemized_data.keys()))), \ |
Contributor
There was a problem hiding this comment.
Suggested change
| assert metadata_len == len(set(list(phonemized_data.keys()))), \ | |
| assert metadata_len == len(phonemized_data) |
Contributor
There was a problem hiding this comment.
Same for the other dict keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
phoneme_languageflag intraining_config.yamlskip_phonemizationflag since it was unused