essentia
essentia copied to clipboard
Music Extractor results not reproducible
Hi,
I am using MusicExtractor to generate various audio features but the results are not reproducible. Each time I execute the code I get a different output. Can someone help me understand why this is happening and how can I fix it?
Sample Code:
`
fname = "10258704_084.mp4.wav"
samplerate = 44100
audio = es.MonoLoader(filename=fname, sampleRate = samplerate)()
len(audio)
duration = len(audio)/samplerate
framesize = int(len(audio)/(duration)*0.025) # 25ms
hopsize = int(len(audio)/(duration)*0.010) # 10ms
kwargs = {
'analysisSampleRate': samplerate,
'lowlevelFrameSize':framesize,
'lowlevelHopSize': hopsize,
'lowlevelZeroPadding': 2048 - framesize,
'loudnessFrameSize': framesize,
'loudnessHopSize': hopsize,
'tonalFrameSize': framesize,
'tonalHopSize': hopsize
}
profile = "audio_config.yaml"
features, features_frames = es.MusicExtractor(profile = profile)(fname)
Output:
Run1:
Run2:
Thanks a lot!
Hi,
have you checked the parameters lowlevelSilentFrames
and tonalSilentFrames
from MusicExtractor? By default, they add noise to the silent frames making it non-deterministic.
One option to address this would be to use a fixed seed for random noise added in FrameCutter. We are using NoiseAdder and it allows to choose between a random seed or 0
.