How can I change the decibel of the .wav file?

14 views (last 30 days)
Hello everyone. I will do speech enhancement with DNN. So I downloaded the TIMIT corpus. However, the sounds for your files look like the picture. How can I set up a for loop to dump all .wav files into one cell? Also, I want to group these sounds as -10 dB, -5 dB, 0 dB, 5dB, 10 dB. However, I don't know how to do this, if you can help, I'd appreciate it.
SA1.wav => data= 49460x1 double
fs = 16000
  4 Comments
yanqi liu
yanqi liu on 12 Jan 2022
yes,sir,what information contains in SA1.txt?
Walter Roberson
Walter Roberson on 12 Jan 2022
Suppose you have a particular .wav file, and you play it. Now play it again after having changed your speaker volume setting. Is it not still the same information in the file that you are playing both times? But didn't it come out different volumes both times? Isn't dB a measure of loudness? So how did the loudness (dB) change if the file contents did not change (and you did not modify the sound before asking to play it), if all you did was turn up or down the volume of the speaker?
The answer is that the values stored in the file are not volumes. The values stored in the file are relative position of the speaker cone compared to its minimum and maximum. Volume is caused by sound pressure, but what is stored in the file is not pressures at all: pressure is caused by vibration of the air. pushed by the speaker cone, and the information in the file is not volumes but rather positions. If the file says to stick the cone out as far as possible and leave it there for 2 seconds, then you might get a pop as you move it to the outside, but then there is no volume because there is no vibration because the speaker is staying in one place, all the way out. Volume is related to change in position of the speaker cone. And the volume knob controls the voltage which controls the minimum and maximum position of the speaker cone. But even then you need to know things like the speaker size and composition (50 volts for a micro-transducer will probably tear the transducer apart, but might be pretty minor if the speakers are made out of concrete.)
So... in order to be able to talk about dB, you need information that relates the readings in the file to specific pressures.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!