# Create the window object. window = pyqhm.SampleWindow(window_duration, signal.fs) # Create the pitch object and calculate its attributes. pitch = pyaapt.yaapt(signal) # Set the number of modulated components. signal.set_nharm(pitch.values, nharm_max) # Check if gaussian noise has to be added. if SNR != float('Inf'): signal.noiser(pitch.values, SNR) # Perform the QHM extraction. QHM = pyqhm.qhm(signal, pitch, window, 0.001, N_iter=3, phase_tech='phase') print("QHM SRER: {}".format(QHM.SRER)) # Perform the aQHM extraction. aQHM = pyqhm.aqhm(signal, QHM, pitch, window, 0.001, N_iter=3, N_runs=2, phase_tech='phase') print("aQHM SRER: {}".format(aQHM.SRER))
# Create the window object. window = pyqhm.SampleWindow(window_duration, signal.fs) # Create the pitch object and calculate its attributes. pitch = pyaapt.yaapt(signal) # Set the number of modulated components. signal.set_nharm(pitch.values, nharm_max) # Check if gaussian noise has to be added. if SNR != float('Inf'): signal.noiser(pitch.values, SNR) # Perform the QHM extraction. QHM = pyqhm.qhm(signal, pitch, window, 0.001, N_iter = 3, phase_tech = 'phase') print ("QHM SRER: %s" % (QHM.SRER)) # Perform the aQHM extraction. aQHM = pyqhm.aqhm(signal, QHM, pitch, window, 0.001, N_iter = 3, N_runs = 2, phase_tech = 'phase') print ("aQHM SRER: %s" % (aQHM.SRER)) # Perform the eaQHM extraction. eaQHM = pyqhm.eaqhm(signal, aQHM, pitch, window, 0.001, N_iter=3, N_runs=2, phase_tech = 'phase') print ("eaQHM SRER: %s" % (eaQHM.SRER))