事实证明,在特定帧处拾取音高的方法
t很简单:
def detect_pitch(y, sr, t): index = magnitudes[:, t].argmax() pitch = pitches[index, t] return pitch
首先通过查看
magnitudes阵列来获得最强频率的频率,然后在处找到音调
pitches[index, t]。

事实证明,在特定帧处拾取音高的方法
t很简单:
def detect_pitch(y, sr, t): index = magnitudes[:, t].argmax() pitch = pitches[index, t] return pitch
首先通过查看
magnitudes阵列来获得最强频率的频率,然后在处找到音调
pitches[index, t]。