multiple .wav files, different playback volumes
조회 수: 2 (최근 30일)
이전 댓글 표시
I have about 250 .wav audio files which have different volumes during playback. I assume this difference is a result of moving the microphone during recordings.
Is there a way of altering the soundfile itself so that all of the files play at a similar volume.
Thanks
댓글 수: 0
채택된 답변
Steven Van Vaerenbergh
2016년 10월 5일
You should normalize the sounds so they have the same overall power (per time step).
For example, normalize to power 1 (per sample):
x = audioread(filename);
x = x/sqrt(mean(x.^2));
When you play the normalized sounds through the sound(), each sound should appear to have a similar volume.
In order to avoid distortions you may normalize to a smaller power though, e.g.
x = x/sqrt(mean(x.^2))/10;
If you want something more sophisticated you may have a look at dynamic range compression, though this kind of technique will modify the waveform unrecoverably.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Using audio files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!