python-soundfile icon indicating copy to clipboard operation
python-soundfile copied to clipboard

How to save left and right channel in separate files?

Open dirkliebich opened this issue 1 year ago • 1 comments
trafficstars

Is there a way to save the left and right channel of a recording into separate files? I'm currently splitting the wav files after but given how comprehensive the soundfile lib is, I feel it might be there already.

Any help in this matter is really appreciated.

dirkliebich avatar Mar 21 '24 16:03 dirkliebich

You get a frames x channels numpy array, so just index into that (audio[:, 0] for the first channel).

bastibe avatar Mar 22 '24 06:03 bastibe