Custom data set and data loader in Pytorch

How to make custom dataset and data loader in Pytorch, if my data has variable length phonemes, as Pytorch inbuilt dataset and data loader won’t work in this case. How to make their batches to train such data in CNN?