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)
        txt_file = meta_file
        with open(txt_file, "r") as ttf:
            for line in ttf:

After Change


        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: 5

Non-data size: 5

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: wkentaro/labelme
Commit Name: dc2dce6f8bc45cc0ccb28f97f553f3efe4293325
Time: 2017-08-18
Author: www.kentaro.wada@gmail.com
File Name: setup.py
Class Name: LabelmeBuildPyCommand
Method Name: run


Project Name: daavoo/pyntcloud
Commit Name: 4e4d24e05b98c99fca8511df38e10fada683e24b
Time: 2017-09-29
Author: daviddelaiglesiacastro@gmail.com
File Name: test/test_sampling.py
Class Name:
Method Name: test_mesh_sampling


Project Name: azavea/raster-vision
Commit Name: 79adb771fc3adc08fde46efba302b61e29049ee6
Time: 2019-04-09
Author: lewfish@gmail.com
File Name: tests/utils/test_files.py
Class Name: TestS3Misc
Method Name: test_file_exists


Project Name: mindsdb/mindsdb
Commit Name: 7b7e2d4094931227e8291212e2acfca82497b54b
Time: 2018-09-27
Author: jorge.torres.maldonado@gmail.com
File Name: mindsdb/config/__init__.py
Class Name:
Method Name: