str = './MineWithMe.BIN';
fid = fopen(str,'r');
[A]=fread(fid,[300000*2,1],'uint8');
for i= 1:300000
if(A(i*2)>=128)
voice(i) = ((A(i*2))*256 +A((i*2-1))) - 65536;
else
voice(i) = (A(i*2)*256+ A((i*2-1)));
end
end
%audiowrite(voice,11025,16,'abcde.wav');
p=audioplayer(voice,11025,16);
play(p);
21IC不支持matlab m文件,注意对齐 |