audio(mixers): some cosmetics

This commit is contained in:
Aleix Conchillo Flaqué
2024-11-04 15:34:20 -08:00
parent 0dd413ee90
commit 3c116b291d
2 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from pipecat.frames.frames import Frame from pipecat.frames.frames import MixerControlFrame
class BaseAudioMixer(ABC): class BaseAudioMixer(ABC):
@@ -36,7 +36,7 @@ class BaseAudioMixer(ABC):
pass pass
@abstractmethod @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 """This will be called when the output transport receives a
MixerControlFrame. MixerControlFrame.

View File

@@ -12,7 +12,7 @@ import numpy as np
from pipecat.audio.mixers.base_audio_mixer import BaseAudioMixer from pipecat.audio.mixers.base_audio_mixer import BaseAudioMixer
from pipecat.audio.utils import resample_audio 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 from loguru import logger
@@ -65,7 +65,7 @@ class SoundfileMixer(BaseAudioMixer):
async def stop(self): async def stop(self):
pass pass
async def process_frame(self, frame: Frame): async def process_frame(self, frame: MixerControlFrame):
if isinstance(frame, MixerUpdateSettingsFrame): if isinstance(frame, MixerUpdateSettingsFrame):
await self._update_settings(frame) await self._update_settings(frame)
elif isinstance(frame, MixerEnableFrame): elif isinstance(frame, MixerEnableFrame):