-
Notifications
You must be signed in to change notification settings - Fork 221
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
prepare timit manifests #324
Changes from 1 commit
bd83e95
539304f
f65fe93
16a5d78
51146b2
ba57dc7
752ce90
9554ad5
123fb1b
69479c8
73ce2bb
7789a2c
d8b50f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -78,15 +78,15 @@ def prepare_timit( | |||||
wav_files = [] | ||||||
file_name = '' | ||||||
|
||||||
if part == 'TRAIN': | ||||||
file_name = os.path.join(splits_dir, 'train_samples.txt') | ||||||
if part == 'TRAIN': | ||||||
file_name = splits_dir/'train_samples.txt' | ||||||
elif part == 'DEV': | ||||||
file_name = os.path.join(splits_dir, 'dev_samples.txt') | ||||||
file_name = splits_dir/'dev_samples.txt' | ||||||
else: | ||||||
file_name = os.path.join(splits_dir, 'tst_samples.txt') | ||||||
|
||||||
file_name = splits_dir/'tst_samples.txt' | ||||||
wav_files = [] | ||||||
with open(file_name, 'r') as f: | ||||||
lines = f.readlines() | ||||||
lines = f.readlines() | ||||||
for line in lines: | ||||||
items = line.strip().split(' ') | ||||||
wav = os.path.join(corpus_dir, items[-1]) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
@@ -98,8 +98,8 @@ def prepare_timit( | |||||
for wav_file in tqdm(wav_files): | ||||||
items = wav_file.split('/') | ||||||
idx = items[-2] + '-' + items[-1][:-4] | ||||||
speaker = items[-2] | ||||||
transcript_file = wav_file[:-3] + 'PHN' ###the phone file | ||||||
speaker = items[-2] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove ALL leading and trailing spaces. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do it. |
||||||
transcript_file = Path(wav_file).with_suffix('.PHN') | ||||||
if not Path(wav_file).is_file(): | ||||||
logging.warning(f'No such file: {wav_file}') | ||||||
continue | ||||||
|
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.
I would suggest to add a space before and after opterator "/".