4326582bb1e68480ef79a02abbf4bfacc3aadede,datasets/TTSDataset.py,MyDataset,collate_fn,#MyDataset#Any#,173
Before Change
item_idxs = [d["item_idx"] for d in batch]
text = [d["text"] for d in batch]
text_lenghts = np.array([len(x) for x in text])
max_text_len = np.max(text_lenghts)
// if specs are not computed, compute them.
if batch[0]["mel"] is None and batch[0]["linear"] is None:
After Change
if isinstance(batch[0], collections.Mapping):
text_lenghts = np.array([len(d["text"]) for d in batch])
text_lenghts, ids_sorted_decreasing = torch.sort(
torch.LongTensor(text_lenghts), dim=0, descending=True)
wav = [batch[idx]["wav"] for idx in ids_sorted_decreasing]
item_idxs = [
batch[idx]["item_idx"] for idx in ids_sorted_decreasing
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: mozilla/TTS
Commit Name: 4326582bb1e68480ef79a02abbf4bfacc3aadede
Time: 2019-03-06
Author: egolge@mozilla.com
File Name: datasets/TTSDataset.py
Class Name: MyDataset
Method Name: collate_fn
Project Name: dpressel/mead-baseline
Commit Name: 9a78373369981ad1cf032fbcc0c675498f32967f
Time: 2020-05-01
Author: dpressel@gmail.com
File Name: mead/pytorch/exporters.py
Class Name:
Method Name: create_data_dict
Project Name: ncullen93/torchsample
Commit Name: 6ddf825a4aa1bcf3a35bba8d36bc433fe5ebaa39
Time: 2017-04-24
Author: ncullen@Nicks-MacBook-Pro.local
File Name: torchsample/utils.py
Class Name:
Method Name: th_nearest_interp_3d