Difference between revisions of "Sound spectrum"
From cod3v
(→Theory) |
(→Theory) |
||
Line 6: | Line 6: | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
import pyaudio | |||
#import wave | |||
import multiprocessing | |||
import numpy as np | |||
#import pickle #Not good for np arrays | |||
import time | |||
from pathlib import Path | |||
audio = pyaudio.PyAudio() # create pyaudio instantiation | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 23:40, 15 February 2021
Introduction
Use USB microphone to listen sound and FFT it to waveforms.
Theory
import pyaudio
#import wave
import multiprocessing
import numpy as np
#import pickle #Not good for np arrays
import time
from pathlib import Path
audio = pyaudio.PyAudio() # create pyaudio instantiation