diff --git a/src/pipecat/audio/mixers/base_audio_mixer.py b/src/pipecat/audio/mixers/base_audio_mixer.py index bd9d03b89..0ba212d85 100644 --- a/src/pipecat/audio/mixers/base_audio_mixer.py +++ b/src/pipecat/audio/mixers/base_audio_mixer.py @@ -6,7 +6,7 @@ from abc import ABC, abstractmethod -from pipecat.frames.frames import Frame +from pipecat.frames.frames import MixerControlFrame class BaseAudioMixer(ABC): @@ -36,7 +36,7 @@ class BaseAudioMixer(ABC): pass @abstractmethod - async def process_frame(self, frame: Frame): + async def process_frame(self, frame: MixerControlFrame): """This will be called when the output transport receives a MixerControlFrame. diff --git a/src/pipecat/audio/mixers/soundfile_mixer.py b/src/pipecat/audio/mixers/soundfile_mixer.py index a9a17a106..f2fa20654 100644 --- a/src/pipecat/audio/mixers/soundfile_mixer.py +++ b/src/pipecat/audio/mixers/soundfile_mixer.py @@ -12,7 +12,7 @@ import numpy as np from pipecat.audio.mixers.base_audio_mixer import BaseAudioMixer from pipecat.audio.utils import resample_audio -from pipecat.frames.frames import Frame, MixerUpdateSettingsFrame, MixerEnableFrame +from pipecat.frames.frames import MixerControlFrame, MixerUpdateSettingsFrame, MixerEnableFrame from loguru import logger @@ -65,7 +65,7 @@ class SoundfileMixer(BaseAudioMixer): async def stop(self): pass - async def process_frame(self, frame: Frame): + async def process_frame(self, frame: MixerControlFrame): if isinstance(frame, MixerUpdateSettingsFrame): await self._update_settings(frame) elif isinstance(frame, MixerEnableFrame):