This commit is contained in:
Michael Hansen
2023-12-11 10:40:15 -06:00
parent a92bf2908d
commit b1cc6da8f5
+4
View File
@@ -703,6 +703,7 @@ class VadStreamingSatellite(SatelliteBase):
if not self.is_streaming:
# Check VAD
chunk: Optional[AudioChunk] = None
if audio_bytes is None:
# Need to unpack
chunk = AudioChunk.from_event(event)
@@ -730,6 +731,9 @@ class VadStreamingSatellite(SatelliteBase):
if self.vad_buffer is not None:
# Send contents of VAD buffer first
if chunk is None:
chunk = AudioChunk.from_event(event)
await self.event_to_server(
AudioChunk(
rate=chunk.rate,