Don't skip chunk before speech (#93825)

This commit is contained in:
Michael Hansen 2023-05-30 15:18:55 -05:00 committed by GitHub
parent 9f4c9f1ce3
commit 1dcabae760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,12 +285,12 @@ class PipelineRtpDatagramProtocol(RtpDatagramProtocol):
chunk = await self._audio_queue.get()
while chunk:
chunk_buffer.append(chunk)
segmenter.process(chunk)
if segmenter.in_command:
return True
# Buffer until command starts
chunk_buffer.append(chunk)
return True
async with async_timeout.timeout(self.audio_timeout):
chunk = await self._audio_queue.get()