Update microphone.py

This commit is contained in:
not-matt 2018-01-06 20:02:04 +00:00 committed by GitHub
parent 06f775fc92
commit 1b2b1ded8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ def start_stream(callback):
try:
y = np.fromstring(stream.read(frames_per_buffer, exception_on_overflow=False), dtype=np.int16)
y = y.astype(np.float32)
stream.read(get_read_available(), exception_on_overflow=False)
#stream.read(get_read_available(), exception_on_overflow=False)
callback(y)
except IOError:
overflows += 1