1
1
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:
louistiti 2024-07-01 22:28:18 +08:00
parent 8ed7c78074
commit 1d96655b01

View File

@ -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: