diff --git a/audio spectrum_pt1_waveform_viewer.ipynb b/audio spectrum_pt1_waveform_viewer.ipynb index 8b91013..93f3672 100644 --- a/audio spectrum_pt1_waveform_viewer.ipynb +++ b/audio spectrum_pt1_waveform_viewer.ipynb @@ -98,7 +98,7 @@ "while True:\n", " \n", " # binary data\n", - " data = stream.read(CHUNK) \n", + " data = stream.read(CHUNK, exception_on_overflow = False)\n", " \n", " # convert data to integers, make np array, then offset it by 127\n", " data_int = struct.unpack(str(2 * CHUNK) + 'B', data)\n", diff --git a/audio spectrum_pt2_spectrum_analyzer.ipynb b/audio spectrum_pt2_spectrum_analyzer.ipynb index 5600f5e..ef7a811 100644 --- a/audio spectrum_pt2_spectrum_analyzer.ipynb +++ b/audio spectrum_pt2_spectrum_analyzer.ipynb @@ -112,7 +112,7 @@ "while True:\n", " \n", " # binary data\n", - " data = stream.read(CHUNK) \n", + " data = stream.read(CHUNK, exception_on_overflow = False)\n", "\n", " data_np = np.frombuffer(data, dtype='h')\n", " \n",