Frequency Analysis in Python
问题 I'm trying to use Python to retrieve the dominant frequencies of a live audio input. For the moment I am experimenting using the audio stream my Laptop's built in microphone, but when testing the following code, I am getting very poor results. # Read from Mic Input and find the freq's import pyaudio import numpy as np import bge import wave chunk = 2048 # use a Blackman window window = np.blackman(chunk) # open stream FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 1920 p = pyaudio.PyAudio()