How to remove header of a wavfile in Matlab

岁酱吖の 提交于 2019-12-05 16:03:39

I could manage to remove header and correct the distortion by :

            wavFile = fopen(fullFileName, 'r');% Open file for reading 
            fseek (wavFile, 1024, -1);% Skip past header, which is 1024 bytes long.
            wF = fread (wavFile, inf, 'int16');% 16-bit signed integers
            wF = wF(:)';
            wF = 0.8*wF/max(abs(wF));
            newWavFile =strcat('1_',fileNames(fileNo).name);% Open file for reading
            wavwrite(wF,16000,16,newWavFile);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!