I am trying to convert my recorded sound wave on Audacity, into a numerical form (a bit like a list of x,y coordinates) and import this into an Excel spreadsheet, and/or Python. Is there any way I can do this? I’m sure there must be some sort of technique which would allow me to just capture the audio as a text file but not exactly sure how! Secondly, is there any way to convert a bunch of coordinates into something that Audacity can read and play back to me as sound? Many thanks!
Note that for the default sample rate of 44100, there are 44100 samples per audio channel each second. Each character in a text or csv file requires (at least) one byte of data, so 1 second of mono audio will produce over 366 KB of text data.
Thanks so much.
Just a quick follow up.
When I try to export time indexed data I get two duplicate columns of the ‘y value’ rather than one column with the x values. Are you aware of how I could troubleshoot this?
In answer to the first post - No I don’t get that, I get a single column of zeros
A lot of songs have silence in the beginning so it wouldn’t be unusual to get several thousand zeros before you get to the audio. Try selecting some audio where you can see the wave instead of starting at the beginning.
I’ve never programmed in Python but it should be simple to open a WAV file. A [u]WAV file[/u] is simply a header followed by a series of “Y” values (the amplitude at one instant in time).
The header contains the number of bits per sample and the number of samples so the software knows how to convert the bytes to sample values and separate left from right in a stereo file. The 'X" values are implied by the sample rate (samples per second).