| | |
| | | f.flush() |
| | | |
| | | |
| | | def calc_shape(args, dataset, nj=32): |
| | | def calc_shape(args, dataset, nj=64): |
| | | shape_path = os.path.join(args.data_dir, dataset, "speech_shape") |
| | | if os.path.exists(shape_path): |
| | | logging.info('Shape file for small dataset already exists.') |
| | |
| | | start = 0 |
| | | for i in range(nj): |
| | | end = start + num_job_lines |
| | | file = os.path.join(shape_path, "wav.scp.{}".format(str(i + 1))) |
| | | file = os.path.join(split_shape_path, "wav.scp.{}".format(str(i + 1))) |
| | | with open(file, "w") as f: |
| | | if i == nj - 1: |
| | | f.writelines(lines[start:]) |
| | |
| | | logging.info('Generating shape files done.') |
| | | |
| | | |
| | | def generate_data_list(data_dir, dataset, nj=32): |
| | | def generate_data_list(data_dir, dataset, nj=64): |
| | | list_file = os.path.join(data_dir, dataset, "data.list") |
| | | if os.path.exists(list_file): |
| | | logging.info('Data list for large dataset already exists.') |