mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix recording overflow handling
This commit is contained in:
parent
f91e30a2c1
commit
8e4f5d5032
1 changed files with 1 additions and 7 deletions
|
@ -330,13 +330,7 @@ class PyAudioThreadedRecorder(threading.Thread):
|
||||||
|
|
||||||
data = b""
|
data = b""
|
||||||
while not self.finish:
|
while not self.finish:
|
||||||
try:
|
data += stream.read(chunk, exception_on_overflow=False)
|
||||||
data += stream.read(chunk)
|
|
||||||
except IOError as e:
|
|
||||||
if e[1] == pyaudio.paInputOverflowed:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
stream.close()
|
stream.close()
|
||||||
p.terminate()
|
p.terminate()
|
||||||
wf = wave.open(processingSrc, 'wb')
|
wf = wave.open(processingSrc, 'wb')
|
||||||
|
|
Loading…
Reference in a new issue