按时间间隔分析音频数据的属性

发布于 2024-12-03 10:57:05 字数 239 浏览 0 评论 0原文

我一直想尝试音频解析一段时间,但我还没有真正找到适合我想做的事情的库。

我基本上只是想解析一个声音文件,并在歌曲中的某些时间(例如每 10 毫秒左右)获取振幅/频率和其他相关信息,这样我就可以绘制数据图表,例如歌曲在哪里加速很多以及在哪里声音真的很大。

我已经研究了很多 OpenAL,但它看起来并没有提供这种能力,除此之外我还没有找到从哪里开始的运气。如果有人已经做到了这一点或使用了可以做到这一点的库,那么我们将不胜感激。谢谢!

I've been wanting to play around with audio parsing for a while now but I haven't really been able to find the correct library for what I want to do.

I basically just want to parse through a sound file and get amplitudes/frequencies and other relevant information at certain times during the song (like every 10 ms or so) so I can graph the data for example where the song speeds up a lot and where it gets really loud.

I've looked at OpenAL quite a bit but it doesn't look like it provides this ability, other than that I have not had much luck with finding out where to start. If anyone has done this or used a library which can do this a point in the right direction would be greatly appreciated. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2024-12-10 10:57:05

对于解析和解码音频文件,我使用 libsndfile 得到了很好的结果,它在 Windows/OSX/ 上运行Linux 是开源的(LGPL 许可证)。这个库不支持mp3(作者想避免许可问题),但它支持FLAC和Ogg/Vorbis。

如果使用闭源库对您来说不是问题,那么 Quicktime SDK 可能是一个有趣的选择来自苹果。该 SDK 适用于 OSX 和 Windows,并且对注册开发人员免费(您也可以免费注册为 Apple 开发人员)。使用 QT SDK,您可以解析 Quicktime Player 支持的所有文件格式,其中包括 .mp3。 SDK 使您可以访问 QuickTime 安装的所有编解码器,因此您可以读取 .mp3 文件并将其即时解码为 PCM。请注意,要使用此 SDK,您必须安装免费的 QuickTime Player。

至于信号处理库,老实说我不能推荐任何库,因为我已经编写了自己的函数(用于语音识别,如果您好奇的话)。 此页面中列出了一些看起来很有趣的开源项目。

我建议您从简单的开始,例如分析幅度数据,这些数据可以从 PCM 样本中轻松获得,无需进行任何处理。能够可视化数据非常有用,我发现 Audacity 是一个出色的可视化工具,因为它是开源的,您可以在其中构建自己的测试。

祝你好运!

For parsing and decoding audio files I had good results with libsndfile, which runs on Windows/OSX/Linux and is open source (LGPL license). This library does not support mp3 (the author wants to avoid licensing issues), but it does support FLAC and Ogg/Vorbis.

If working with closed source libraries is not a problem for you, then an interesting option could be the Quicktime SDK from Apple. This SDK is available for OSX and Windows and is free for registered developers (you can register as an Apple developer for free as well). With the QT SDK you can parse all the file formats that the Quicktime Player supports, and that includes .mp3. The SDK gives you access to all the codecs installed by QuickTime, so you can read .mp3 files and have them decoded to PCM on the fly. Note that to use this SDK you have to have the free QuickTime Player installed.

As far as signal processing libraries I honestly can't recommend any, as I have written my own functions (for speech recognition, in case you are curious). There are a few open source projects that seem interesting listed in this page.

I recommend that you start simple, for example working on analyzing amplitude data, which is readily available from the PCM samples without having to do any processing. Being able to visualize the data is very useful, I have found Audacity to be an excellent visualization tool, and since it is open source you can build your own tests inside it.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文