def find_pred_onsets(scores, window):
if window.shape[0] > 0:
onset_function = np.convolve(scores, window, mode='same')
else:
onset_function = scores
# see page 592 of "Universal onset detection with bidirectional long short-term memory neural networks"
maxima = argrelextrema(onset_function, np.greater_equal, order=1)[0]
return set(list(maxima))
评论列表
文章目录