MATLAB Answers

I have a *.wav file. How do I change the bit rate(bits per sample) of it?

32 views (last 30 days)
I know the sampling frequency, bits per sample(bps) of the audio file. How can I change the bit rate?

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 13 Sep 2019
The only way I am aware of to change the bit rate is to read the audio file using audioread, then write it with audiowrite using different values for 'BitsPerSample' and 'BitRate'. See the documentation on the relevant functions, and Read and Write Audio Files for details. If you also want to change the sampling frequency, use the resample function before writing the file.

  1 Comment

Talal Salim
Talal Salim on 1 Jun 2020
is there a way to change the 'BitsPerSample' without using audioread, because I have a lot of wav files that characterized by 4 bits as their bit depth, and unfortunately these wav files cant be read using the audioread function, it gives this error:
[File could not be read due to an unexpected error. Reason: Error in WAV/W64/RF64/ file. Malformed 'fmt' chunck]

Sign in to comment.

More Answers (0)