Moved ProotState to own file.
Moved Point2D to own file. Added caching for parsed images.
This commit is contained in:
parent
bdcb648765
commit
ab34ad2455
6 changed files with 340 additions and 259 deletions
12
rpi/micTest.py
Normal file
12
rpi/micTest.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Print out realtime audio volume as ascii bars
|
||||
|
||||
import sounddevice as sd
|
||||
import numpy as np
|
||||
|
||||
def callback(indata: np.ndarray, outdata: np.ndarray, frames: int, time, status) -> None:
|
||||
print(indata.shape)
|
||||
volume_norm = np.linalg.norm(indata)*10
|
||||
print ("|" * int(volume_norm))
|
||||
|
||||
with sd.Stream(callback=callback):
|
||||
sd.sleep(10000)
|
||||
Loading…
Add table
Add a link
Reference in a new issue