Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions egs/wsj/s5/steps/data/augment_data_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def check_args(args):
return args

def get_noise_list(noise_wav_scp_filename):
noise_wav_scp_file = open(noise_wav_scp_filename, 'r').readlines()
noise_wav_scp_file = open(noise_wav_scp_filename, 'r', encoding='utf-8').readlines()
noise_wavs = {}
noise_utts = []
for line in noise_wav_scp_file:
Expand Down Expand Up @@ -204,7 +204,7 @@ def main():
num_bg_noises = [int(i) for i in args.num_bg_noises.split(":")]
reco2dur = parse_file_to_dict(input_dir + "/reco2dur",
value_processor = lambda x: float(x[0]))
wav_scp_file = open(input_dir + "/wav.scp", 'r').readlines()
wav_scp_file = open(input_dir + "/wav.scp", 'r', encoding='utf-8').readlines()

noise_wavs = {}
noise_reco2dur = {}
Expand Down
2 changes: 1 addition & 1 deletion egs/wsj/s5/steps/data/reverberate_data_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def add_prefix_to_fields(input_file, output_file, num_replicas, include_original
""" This function replicate the entries in files like segments, utt2spk, text
"""
list = [x.strip() for x in open(input_file, encoding='utf-8')]
f = open(output_file, "w" ,encoding='utf-8')
f = open(output_file, "w", encoding='utf-8')
if include_original:
start_index = 0
else:
Expand Down