Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- duration = 5.5 # seconds
- def callback(indata, outdata, frames, time, status):
- if status:
- print(status)
- outdata[:] = indata
- with sd.RawStream(channels=2, dtype='int24', callback=callback):
- sd.sleep(int(duration * 1000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement