wav 录音流提取卷号
我有一个来自麦克风的音频数据Stream
,我想显示其当前录音音量级别。根据我收集的信息,我需要在数组中存储 X 个字节,然后我可以使用该数据来处理记录中的一个样本。如何确定 X 是什么?我需要做什么才能从该数据中获取音量级别?
我正在使用 C#,但即使是伪代码也会非常有帮助
I have a Stream
of audio data coming from my mic for which I would like to display the current recording volume level. From what I've gathered, I need to store X number of bytes in an array and then I can use that data to process that one sample from the recording. How do I determine what X is, and what do I need to do to get the volume level from that data?
I'm working in C# but even pseudo code would be very helpful
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WAV 文件是调幅的,因此每个样本值都是相对音量。对时间进行平均,您将得到平均音量。
注意事项:
以下是一些用于读取 WAV 文件的 .NET 示例代码:
http://www.codeproject.com/KB/audio-video/WaveEdit.aspx
WAV files are amplitude-modulated, so each sample value is the relative volume. Average across time and you get an average volume.
Things to watch out for:
Here's some sample .NET code for reading WAV files:
http://www.codeproject.com/KB/audio-video/WaveEdit.aspx