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

Before Change


def mozilla(root_path, meta_files):
    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]

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])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

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: rwth-i6/returnn-experiments
Commit Name: 7247571ab448f9ccf6b392a26df0b8b40b1085eb
Time: 2018-05-16
Author: zeyer@i6.informatik.rwth-aachen.de
File Name: 2018-asr-attention/librispeech/full-setup-attention/tools/collect-train-text.py
Class Name:
Method Name:


Project Name: sony/nnabla-examples
Commit Name: f1fca244a7b6bff0ff66a052b58d3a3798d74ecb
Time: 2020-03-20
Author: Takuya.Narihira@sony.com
File Name: imagenet-classification/create_input_files.py
Class Name:
Method Name: main


Project Name: dmlc/gluon-nlp
Commit Name: 4f89ca033537fe83d912d858b3e337e40a8c799d
Time: 2019-06-05
Author: linhaibin.eric@gmail.com
File Name: src/gluonnlp/data/stream.py
Class Name: SimpleDatasetStream
Method Name: __init__