Solving MATLAB Error wavread: Incorrect Chunk Size Info

  • MATLAB
  • Thread starter Sahand_S
  • Start date
  • Tags
    Matlab
In summary, the individual is experiencing an error while using the "wavread" comment on certain wave files. The error message states that there is incorrect chunk size information in the WAV file, and the error is found on line 166 of the code. The individual suggests looking at the first bit of code for further assistance.
  • #1
Sahand_S
2
0
Hi.

I tried to use wavread comment but on some wave files, it showed me following error:

Code:
? Error using ==> wavread at 166
Incorrect chunk size information in WAV file.

Please help me. thanks a lot.
 
Physics news on Phys.org
  • #2
This is where it finds the error
Code:
 if fseek(fid,ck.Size,0) == -1
         error('wavread:InvalidFile', ...
             'Incorrect chunk size information in WAV file.');
      end

This is what sends the error

Code:
 catch exception
    fclose(fid);
    throw(exception);  % line 166
end

So yeah, sorry I can't be more help, but you need to look at the first bit of code as this is where it finds an error. (fseek line)
 
  • #3
Thanks a lot.
 

1. Why am I getting the error message "wavread: Incorrect Chunk Size Info" in MATLAB?

This error typically occurs when the header information of the WAV file is not correctly formatted. MATLAB is unable to read the file because the chunk size information is incorrect.

2. How can I fix the "Incorrect Chunk Size Info" error in MATLAB?

To fix this error, you will need to edit the header information of the WAV file. This can be done using a WAV file editor or by using the built-in MATLAB function "audioread".

3. Can I still use the WAV file even with the "Incorrect Chunk Size Info" error?

No, MATLAB will not be able to read the file and you will need to fix the error before using the WAV file in your code.

4. What causes the "Incorrect Chunk Size Info" error in MATLAB?

This error can be caused by a variety of factors, such as a corrupted WAV file, incorrect formatting of the header information, or using an outdated version of MATLAB.

5. Is there a way to prevent the "Incorrect Chunk Size Info" error in MATLAB?

To prevent this error, make sure to use valid WAV files with correctly formatted header information. If you are creating WAV files using MATLAB, use the appropriate functions to ensure the header information is properly formatted.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
893
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
415
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top