Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.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 如何在librosa中找到自定义帧列表的能量?_Python_Python 3.x_Audio Processing_Librosa_Aubio - Fatal编程技术网

Python 如何在librosa中找到自定义帧列表的能量?

Python 如何在librosa中找到自定义帧列表的能量?,python,python-3.x,audio-processing,librosa,aubio,Python,Python 3.x,Audio Processing,Librosa,Aubio,我试图找到帧列表的能量。我想把它们分为四个标准。例如“弱、正常、强、太强”和使混合数组像 normal_frames_array = [ 6, 34, 52, 71, 88, 107, 125, 143, 161, 198, 216, 234, 271, 289, 352, 397, 416, 434, 461, 479, 498, 516, 552, 571, 589, 644, 662, 716, . . . 8204, 8222, 8241, 8259,

我试图找到帧列表的能量。我想把它们分为四个标准。例如“弱、正常、强、太强”和使混合数组像

normal_frames_array = [
   6, 34, 52, 71, 88, 107, 125, 143, 161, 198, 216, 234, 271, 289,
   352, 397, 416, 434, 461, 479, 498, 516, 552, 571, 589, 644, 662, 716,
   .
   .
   .
   8204, 8222, 8241, 8259, 8277, 8295, 8313, 8332, 8350, 8368, 8386, 8404, 8423, 8441
]

classified_array = [
   [6, "weak"],
   [34, "normal"],
   [52, "strong"],
   [71, "very strong"],
   .
   .
   .
   [8167, "weak"]
]

如何在librosa中实现这一点?

首先,您需要定义帧是什么。跳数大小、采样率等用于计算每个帧的能量。如果您知道要分为4类,可以对所有帧编号/能量对进行排序,然后拆分为4/4。这是一个类赋值吗?首先你需要定义什么是框架。跳数大小、采样率等用于计算每个帧的能量。如果您知道要分为4类,可以对所有帧编号/能量对进行排序,然后拆分为4/4。这是课堂作业吗?