WAV文件的频率分布 [英] Frequency distribution from wav files

查看:262
本文介绍了WAV文件的频率分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我可以使用SoX的

I found out that I can use SoX's

play file.wav stat -freq

根据文件的频率生成级别表.

to generate a table of levels against frequencies for a file.

但是,它似乎是实时运行的,即完成播放所需的时间与音频播放所需的时间一样.

However, it seems to run in real time, i.e. takes as long to complete as the audio does to play.

如何在尽可能短的时间内生成相同的频率和电平表?

How can I generate the same table of frequencies and levels but in the shortest time possible?

推荐答案

SoX的输出速度很慢,但这主要是由显示引起的.一种解决方案是将SoX的输出(在 stat 的情况下,在标准错误(stderr)流上)重定向到文件.

The output of SoX is rather slow, but this is mainly caused by the displaying. One solution could be to redirect the output of SoX (which is on the standard error (stderr) stream in the case of stat) to a file.

您可以使用:

sox file.wav -n stat -freq > out 2>&1

,它将stderr重定向到stdout(& 1),然后将stdout重定向到文件"out".有关重定向stderr的其他解决方案,请参见此链接.

that will redirect stderr to stdout (&1), and then redirect stdout to the file 'out'. See this link for other solutions to redirect stderr.

这应该比较快(对于我来说,十分钟的文件需要几秒钟).

This should be rather faster (in my case few seconds for a 10 minute file).

这篇关于WAV文件的频率分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆