, , , , .
, 44,100 , 44 100 ( 1000 ), 22,67 . . , Audio - , , , , ..
In any case, if you want 1 ms resolution for this purpose, pydub , the module can be used for this purpose. Not sure if this is necessary.
Code example
from pydub import AudioSegment
from pydub import utils
chunksize = 1
fname = "C:\\PATH_TO_THE_FILE\\myAudio.wav"
mysong = AudioSegment.from_wav(fname)
myAudioChunks = utils.make_chunks(mysong,chunksize)
for audioChunks in myAudioChunks:
loudness = audioChunks.dBFS
print " loudness in dBFS =", loudness
Above, the volume will be heard in DBFS, if you want the volume in different parameters, here are a few examples.
1) To get the volume in RMS
replace loudness = audioChunks.dBFSwithloudness = audioChunks.rms
2) To get the maximum volume in the sample [that is, the maximum amplitude in any set of samples]
replace loudness = audioChunks.dBFSwithloudness = audioChunks.max
source
share