Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
检测开始时音频文件中的频率,Python_Python_Python 3.x_Librosa_Aubio_Pysoundfile - Fatal编程技术网

检测开始时音频文件中的频率,Python

检测开始时音频文件中的频率,Python,python,python-3.x,librosa,aubio,pysoundfile,Python,Python 3.x,Librosa,Aubio,Pysoundfile,我正在写一个脚本,它将检测歌曲中的新音符(开始),然后在开始时找到频率。我有以下代码 y, sr = librosa.load("Audio\sweet_child_guitar_intro.wav") onset_envelope = librosa.onset.onset_strength(y, sr) # this finds the onset strength of each frame onsets = librosa.onset.on

我正在写一个脚本,它将检测歌曲中的新音符(开始),然后在开始时找到频率。我有以下代码

y, sr = librosa.load("Audio\sweet_child_guitar_intro.wav")          

onset_envelope = librosa.onset.onset_strength(y, sr)    # this finds the onset strength of each frame
onsets = librosa.onset.onset_detect(onset_envelope=onset_envelope)    # these are the frames the onsets occur in

然而,我已经做了无数个小时的研究,以找到发病时的频率,但我没有发现任何东西。有人知道怎么做吗,或者知道给我指的正确方向吗?感谢

检测频率,我相信您必须对数据使用FFT(快速傅立叶变换)来识别输入信号的频率组成。然而,你现在已经超过了我的信号处理能力。也许其他人可以从这里拿走。