Merge pull request #3828 from pipecat-ai/mb/skip-empty-audio-filter-frames
Skip empty audio frames after filter buffering
This commit is contained in:
1
changelog/3828.fixed.md
Normal file
1
changelog/3828.fixed.md
Normal file
@@ -0,0 +1 @@
|
||||
- Fixed misleading "Empty audio frame received for STT service" warnings when using audio filters (e.g. `RNNoiseFilter`, `KrispVivaFilter`, `AICFilter`) that buffer audio internally.
|
||||
@@ -424,6 +424,11 @@ class BaseInputTransport(FrameProcessor):
|
||||
if self._params.audio_in_filter:
|
||||
frame.audio = await self._params.audio_in_filter.filter(frame.audio)
|
||||
|
||||
# Skip frames with no audio data (e.g. filter is buffering).
|
||||
if not frame.audio:
|
||||
self._audio_in_queue.task_done()
|
||||
continue
|
||||
|
||||
###################################################################
|
||||
# DEPRECATED.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user