pipecat
pipecat copied to clipboard
I am trying to add emotion based filler detection in a parallel pipeline and getting error value=AttributeError("'AudioRawFrame' object has no attribute 'id'")
pipecat version
0.0.87
Python version
3.11
Operating System
mac os
Question
Trying to add filler processor in a parallel pipeline by throwing audio frame directly from processor and getting below error
getting this error: time_str=2025-11-28 14:56:04.309106+0530 level=ERROR logger= message=ParallelPipeline#1::Sink0: error processing frame: 'AudioRawFrame' object has no attribute 'id' exception=(type=<class 'AttributeError'>, value=AttributeError("'AudioRawFrame' object has no attribute 'id'"), traceback=<traceback object at 0x129891a80>)
What I've tried
Filler processor code:
elif isinstance(frame, TranscriptionFrame):
# If we have filler audio ready, send it first
if self._last_filler_audio:
# frame_id = getattr(frame, 'id', None)
audio_frame = AudioRawFrame(
audio=self._last_filler_audio,
sample_rate=self._sample_rate,
num_channels=1
)
# if frame_id:
# audio_frame.id = frame_id
await self.push_frame(audio_frame, direction)
self.logger.info(f"Injected filler audio for emotion: {self._last_emotion}")
self._last_filler_audio = None # Clear after use
# CRITICAL FIX: Always pass through the original frame
# Don't return early after injecting filler
await self.push_frame(frame, direction)
pipeline:
parallel_component_1 = [emotion_filler]
# Branch 2: Normal LLM processing path
parallel_component_2 = [context_aggregator.user()]
if user_transcript_recorder:
parallel_component_2.append(user_transcript_recorder)
if llm:
parallel_component_2.append(llm)
if transliterator:
parallel_component_2.append(transliterator)
if text_cleaner:
parallel_component_2.append(text_cleaner)
if tts:
parallel_component_2.append(tts)
# Post-parallel components
if bot_audio_recorder:
parallel_component_2.append(bot_audio_recorder)
pipeline_components.append(ParallelPipeline(parallel_component_1, parallel_component_2))
if bot_idle_processor:
pipeline_components.append(bot_idle_processor)
if audio_buffer:
pipeline_components.append(audio_buffer)
if metrics_logger:
pipeline_components.append(metrics_logger)
if context_aggregator:
pipeline_components.append(context_aggregator.assistant())
pipeline_components.append(transport.output())
Context
No response