If any of the tasks are independent of the audio file, you can perform them in the __init__ method. Else, instead of doing everything in the __getitem__ method, you can write custom transforms and use them in the order you want. I am not really sure if this is more efficient than doing everything in the __getitem__ method but you can try and check if it is.