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

65 visualizzazioni (ultimi 30 giorni)
I know the sampling frequency, bits per sample(bps) of the audio file. How can I change the bit rate?

Risposta accettata

Star Strider
Star Strider il 13 Set 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 Commento
Talal Salim
Talal Salim il 1 Giu 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]

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by