278c7a91b77448236af73d6942da425a5d5a2e34,datasets/preprocess.py,,mozilla,#Any#Any#,44

Before Change


    Normalizes Mozilla meta data files to TTS format
    import glob
    meta_files = glob.glob(root_path + "/**/batch*.txt", recursive=True)
    folders = [os.path.dirname(f.strip()) for f in meta_files]
    items = []
    for idx, meta_file in enumerate(meta_files):
        folder = folders[idx]
        // txt_file = os.path.join(root_path, meta_file)

After Change


    with open(txt_file, "r") as ttf:
        for line in ttf:
            cols = line.split("|")
            batch_no = int(cols[1].strip().split("_")[0])
            wav_folder = "batch{}".format(batch_no)
            wav_file = os.path.join(root_path, wav_folder, "wavs_no_processing", cols[1].strip())
            text = cols[0].strip()
            items.append([text, wav_file])
    return items
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mozilla/TTS
Commit Name: 278c7a91b77448236af73d6942da425a5d5a2e34
Time: 2019-04-28
Author: egolge@mozilla.com
File Name: datasets/preprocess.py
Class Name:
Method Name: mozilla


Project Name: cjekel/tindetheus
Commit Name: 5a2b9314cd5b3f4da053a3813dceed362b039043
Time: 2018-11-03
Author: cjekel@gmail.com
File Name: tindetheus/tindetheus.py
Class Name:
Method Name: command_line_run


Project Name: osmr/imgclsmob
Commit Name: ea65d92a41ba1e8171cd0814dc9c50373f8e2c4f
Time: 2020-01-16
Author: osemery@gmail.com
File Name: eval_ch.py
Class Name:
Method Name: main