MATLAB: How can represent a recorded speech signal(.wav format) as a binary matrix

audio to binaryconversion

A audio(in wav format) is read to variable 'p' using wavread().The sample values p contain vary between -1 and +1.what i exactly need is a binary row matrix which represent that wav file as 0's and 1's.
And how can i convert that binary row matrix back to the same audio?

Best Answer

[data, fs] = wavread(FileName, 'native');
Now your data is probably integers or convertible to integers. After that you use dec2bin() and transpose and reshape.