audio(mixers): some cosmetics
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user