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