You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with the Essentia library in Python. I'm using the PredominantPitchMelodia algorithm, and I noticed that when I create an instance of the algorithm and use it to extract pitch information from an audio signal, it works as expected the first time. However, when I use the same instance of the algorithm again to process another audio signal, the pitch information is empty.
This code is just an example to show the behaviour.
Code Snippet:
importessentia.standardases# Create an instance of PredominantPitchMelodiapitch_extractor=es.PredominantPitchMelodia()
# First extraction works finepitch1, _=pitch_extractor(samples)
# Second extraction returns an empty arraypitch2, _=pitch_extractor(samples)
print("First Pitch:", pitch1)
# [ 0. 0. 0. ... 0. 372.14197 0. ]print("Second Pitch:", pitch2)
# []
Expected Behavior:
I expected the PredominantPitchMelodia instance to print the same result twice:
[ 0. 0. 0. ... 0. 372.14197 0. ]
[ 0. 0. 0. ... 0. 372.14197 0. ]
However, it seems like the second extraction with the same instance results in an empty pitch array and the output is:
[ 0. 0. 0. ... 0. 372.14197 0. ]
[]
Questions:
Is there something specific I need to do to reinitialize the PredominantPitchMelodia instance before using it again?
Any insights or suggestions would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered:
Thanks for reporting, this should be fixed in the master branch now. PyPI wheels will be updated later. As a workaround for using current Python wheels, you can explicitly call pitch_extractor.reset() after each compute.
Issue Description:
I'm experiencing an issue with the Essentia library in Python. I'm using the
PredominantPitchMelodia
algorithm, and I noticed that when I create an instance of the algorithm and use it to extract pitch information from an audio signal, it works as expected the first time. However, when I use the same instance of the algorithm again to process another audio signal, the pitch information is empty.This code is just an example to show the behaviour.
Code Snippet:
Expected Behavior:
I expected the PredominantPitchMelodia instance to print the same result twice:
[ 0. 0. 0. ... 0. 372.14197 0. ]
[ 0. 0. 0. ... 0. 372.14197 0. ]
However, it seems like the second extraction with the same instance results in an empty pitch array and the output is:
[ 0. 0. 0. ... 0. 372.14197 0. ]
[]
Questions:
Any insights or suggestions would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: