Skip to content

PitchMelodia returns results above "maxFrequency" parameter #618

Open
@pbrusco

Description

@pbrusco

Hi, I'm using the python library.

The problem is when I try to set the max and min frequency on the PitchMelodia function. Here is an example. It seems that in this case the parameters are beeing ignored. I'm using the library for speech processing when I need the maxFrequency not to be above 500Hz. Any ideas?

Thanks

frameSize = 2048
sampleRate = 16000
hopSize = 128
guessUnvoiced = True # read the algorithm's reference for more details
run_predominant_melody = PitchMelodia(guessUnvoiced=guessUnvoiced,
                                      frameSize=frameSize,
                                      maxFrequency=100, 
                                      minFrequency=50,
                                      minDuration=50);

# Load audio file, apply equal loudness filter, and compute predominant melody
audio = MonoLoader(filename = filename, sampleRate=sampleRate)()
audio = EqualLoudness()(audio)
pitch, confidence = run_predominant_melody.compute(audio)

print max(pitch), min(pitch) # Here I get (735.73798, 0.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions