mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-27 16:16:48 +03:00
fix(python tcp server): overflowed on ASR
This commit is contained in:
parent
8ed7c78074
commit
1d96655b01
@ -111,7 +111,7 @@ class ASR:
|
||||
self.log("Recording...")
|
||||
|
||||
while self.is_recording:
|
||||
data = self.stream.read(self.frames_per_buffer)
|
||||
data = self.stream.read(self.frames_per_buffer, exception_on_overflow=False)
|
||||
rms = audioop.rms(data, 2) # width=2 for format=paInt16
|
||||
|
||||
if rms >= self.rms_threshold:
|
||||
|
Loading…
Reference in New Issue
Block a user