I have a *.wav file. How do I change the bit rate(bits per sample) of it?
69 次查看(过去 30 天)
显示 更早的评论
I know the sampling frequency, bits per sample(bps) of the audio file. How can I change the bit rate?
0 个评论
采纳的回答
Star Strider
2019-9-13
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 个评论
Talal Salim
2020-6-1
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]
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!