Merge pull request #2239 from pipecat-ai/filipi/daily_log
Added `set_log_level` to `DailyTransport`
This commit is contained in:
@@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Added `LocalSmartTurnAnalyzerV2`, which supports local on-device inference
|
- Added `LocalSmartTurnAnalyzerV2`, which supports local on-device inference
|
||||||
with the new `smart-turn-v2` turn detection model.
|
with the new `smart-turn-v2` turn detection model.
|
||||||
|
|
||||||
|
- Added `set_log_level` to `DailyTransport`, allowing setting the logging level
|
||||||
|
for Daily's internal logging system.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Updated the `deepgram` optional dependency to 4.7.0, which downgrades the
|
- Updated the `deepgram` optional dependency to 4.7.0, which downgrades the
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask
|
|||||||
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
||||||
from pipecat.services.cartesia.tts import CartesiaTTSService
|
from pipecat.services.cartesia.tts import CartesiaTTSService
|
||||||
from pipecat.services.openai.llm import OpenAILLMService
|
from pipecat.services.openai.llm import OpenAILLMService
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyLogLevel, DailyParams, DailyTransport
|
||||||
|
|
||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
|
|
||||||
@@ -43,6 +43,7 @@ async def main():
|
|||||||
vad_analyzer=SileroVADAnalyzer(),
|
vad_analyzer=SileroVADAnalyzer(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
transport.set_log_level(DailyLogLevel.Info)
|
||||||
|
|
||||||
tts = CartesiaTTSService(
|
tts = CartesiaTTSService(
|
||||||
api_key=os.getenv("CARTESIA_API_KEY"),
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ try:
|
|||||||
VirtualCameraDevice,
|
VirtualCameraDevice,
|
||||||
VirtualSpeakerDevice,
|
VirtualSpeakerDevice,
|
||||||
)
|
)
|
||||||
|
from daily import (
|
||||||
|
LogLevel as DailyLogLevel,
|
||||||
|
)
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
logger.error(f"Exception: {e}")
|
logger.error(f"Exception: {e}")
|
||||||
logger.error(
|
logger.error(
|
||||||
@@ -1924,6 +1927,18 @@ class DailyTransport(BaseTransport):
|
|||||||
"""
|
"""
|
||||||
return self._client.participant_id
|
return self._client.participant_id
|
||||||
|
|
||||||
|
def set_log_level(self, level: DailyLogLevel):
|
||||||
|
"""Set the logging level for Daily's internal logging system.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
level: The log level to set. Should be a member of the DailyLogLevel enum,
|
||||||
|
such as DailyLogLevel.Info, DailyLogLevel.Debug, etc.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
transport.set_log_level(DailyLogLevel.Info)
|
||||||
|
"""
|
||||||
|
Daily.set_log_level(level)
|
||||||
|
|
||||||
async def send_image(self, frame: OutputImageRawFrame | SpriteFrame):
|
async def send_image(self, frame: OutputImageRawFrame | SpriteFrame):
|
||||||
"""Send an image frame to the Daily call.
|
"""Send an image frame to the Daily call.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user