简体   繁体   English

如何对来自pyaudio的麦克风音频信息进行数学分析?

[英]How do I do mathematical analysis on microphone audio information from pyaudio?

I am trying to obtain the pitch, the level, and other stuff from my microphone using Python. 我正在尝试使用Python从麦克风获取音高,水平和其他内容。 I am trying using pyaudio, but I read that I need to use other libraries to generate the maths. 我正在尝试使用pyaudio,但我读到我需要使用其他库来生成数学。 I can't find how mix pyaudio with the math library. 我找不到如何将pyaudio与数学库混合使用。

您可以通过audioop.rms函数使用标准的Python模块audioop来确定音频样本的功率/响度。

I have performed basic signal processing (FFT etc) using numpy/scipy directly on the audio buffer without too much trouble. 我已经在音频缓冲区上直接使用numpy / scipy进行了基本的信号处理(FFT等),没有太多麻烦。 Be careful, you need to tell numpy about the buffer type: float or int, long or short, signed/unsigned ... 注意,您需要告诉numpy缓冲区类型:float或int,long或short,有符号/无符号...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM