Python Forum

Full Version: convert pcm to image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi friends,

I have test.pcm file with raw data i want to draw wave form to image from pcm file how can i do.
You have to know the structure of your raw data and the data types inside the structure, then you can parse for example with numpy or struct. After this you have an n-dimensional data-structure. For example, 44.100 Hz stereo 1 second long has the shape (44100, 2) or (2, 44100) depending on how it was recorded.

Then you can plot the data with matplotlib.