Minor PEP8 formatting changes
This commit is contained in:
parent
68c2a66fa6
commit
5c5300ba7f
@ -181,12 +181,12 @@ volume = dsp.ExpFilter(config.MIN_VOLUME_THRESHOLD,
|
|||||||
# Lots of buffer overflows could mean that FPS is set too high
|
# Lots of buffer overflows could mean that FPS is set too high
|
||||||
buffer_overflows = 1
|
buffer_overflows = 1
|
||||||
|
|
||||||
|
|
||||||
def microphone_update(stream):
|
def microphone_update(stream):
|
||||||
global y_roll, prev_rms, prev_exp
|
global y_roll, prev_rms, prev_exp
|
||||||
# Retrieve and normalize the new audio samples
|
# Retrieve and normalize the new audio samples
|
||||||
try:
|
try:
|
||||||
y = np.fromstring(stream.read(samples_per_frame), dtype=np.int16)
|
y = np.fromstring(stream.read(samples_per_frame), dtype=np.int16)
|
||||||
# exception_on_overflow=False), dtype=np.int16)
|
|
||||||
except IOError:
|
except IOError:
|
||||||
y = y_roll[config.N_ROLLING_HISTORY - 1, :]
|
y = y_roll[config.N_ROLLING_HISTORY - 1, :]
|
||||||
global buffer_overflows
|
global buffer_overflows
|
||||||
|
Loading…
Reference in New Issue
Block a user