Torchaudio .wav load

Hello, I hope you’re all doing fine.
I’m trying to preprocess .wav files with torchaudio, when i run the instruction waveform, sample_rate = torchaudio.load(filename)
the waveform tensor is of a shape [number_of_channels, some_number],
sometimes the number of channels is 1 and sometimes it’s 2.
I want to know whether there is a way to force the number of channels to always be one.
I tried to look on the we to understand what is the meaning of the number of channel but I did’nt find anything useful.

If the two channels are identical, and even if they aren’t, you can always just use one of them. If you have truly stereo audio, then you have to decide how you want to monoize it. Usually just averaging the channels works OK, but it could be problematic especially if the two channels might be out of phase, which can happen due to processing or just because the microphones were far away from each other. There are probably more sophisticated techniques than averaging that could be useful in some cases, but I never tried them.

That’s very helpful, thank you very much.
Do you have any good reference so that I can read about waveforms?