[Tutor] Can I have some assistance understanding the wave module

Nathan Smith nathan-tech at hotmail.com
Mon Oct 10 12:03:18 EDT 2022


Hello,


So I am trying to work with the wave module, with the end goal of taking 
raw data from an audio CD and writing it to a Wav file.

To do this I was looking at the wave module (it's there, so surely it's 
the answer) but::


file.setsampwidth: What actually is this? It seems to except a number 
between 1 and 4, but 4 produces a file that is 46 seconds long off disc 
(but only 24 on disc).


To that end, is this related to bit depth? Audio CD's are recorded at an 
sr of 44100, and a bit depth of 16, but this being the case, can python'


s wave module not handle this?


In that instance, if I want to write the raw data in 16 bit format so it 
actually plays, how would I begin to look into such a venture?


Thanks

Nathan

-- 

Best Wishes,

Nathan Smith, BSC


My Website: https://nathantech.net




More information about the Tutor mailing list