mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Update Audio FFT example.
* Note this works with the newer ulab that's not updated yet.
This commit is contained in:
parent
7e2df49c5b
commit
730eb33de4
@ -31,7 +31,7 @@ def draw_audio_bar(img, level, offset):
|
||||
fb.draw_rectangle(SIZE+offset, SIZE - ((i+1)*blk_size) + blk_space, 20, blk_size - blk_space, color, 1, True)
|
||||
|
||||
while (True):
|
||||
if (raw_buf):
|
||||
if (raw_buf != None):
|
||||
pcm_buf = np.frombuffer(raw_buf, dtype=np.int16)
|
||||
raw_buf = None
|
||||
fft_buf = sp.signal.spectrogram(pcm_buf[0::2])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user