Compare commits

...

3 Commits

Author SHA1 Message Date
James Hush
7160866a74 Update CHANGELOG.md with daily_room_properties addition 2025-10-14 13:48:10 +08:00
James Hush
171c6b1fa4 Add enable recording 2025-10-14 13:44:24 +08:00
James Hush
732dbab8ba Add daily_room_properties parameter to configure() function
- Allow custom DailyRoomProperties to be passed to configure()
- Falls back to default room properties if not provided
- Enables more flexible room configuration for advanced use cases
2025-10-14 13:40:28 +08:00
2 changed files with 17 additions and 3 deletions

View File

@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Added `daily_room_properties` parameter to `configure()` function in
`pipecat.runner.daily`, allowing custom `DailyRoomProperties` to be passed
for more flexible room configuration.
### Fixed
- Fixed an issue where `RimeHttpTTSService` and `PiperTTSService` could generate

View File

@@ -42,6 +42,7 @@ from typing import Dict, List, Optional
import aiohttp
from loguru import logger
from pydantic import BaseModel
from typing_extensions import Literal
from pipecat.transports.daily.utils import (
DailyRESTHelper,
@@ -82,6 +83,8 @@ async def configure(
sip_enable_video: Optional[bool] = False,
sip_num_endpoints: Optional[int] = 1,
sip_codecs: Optional[Dict[str, List[str]]] = None,
enable_recording: Optional[Literal["cloud", "local", "raw-tracks"]] = None,
daily_room_properties: Optional[DailyRoomProperties] = None,
) -> DailyRoomConfig:
"""Configure Daily room URL and token with optional SIP capabilities.
@@ -99,6 +102,9 @@ async def configure(
sip_num_endpoints: Number of allowed SIP endpoints.
sip_codecs: Codecs to support for audio and video. If None, uses Daily defaults.
Example: {"audio": ["OPUS"], "video": ["H264"]}
enable_recording: Recording mode for the room. One of "cloud", "local", or "raw-tracks".
daily_room_properties: Custom room properties to use instead of default configuration.
If provided, overrides all other property settings.
Returns:
DailyRoomConfig: Object with room_url, token, and optional sip_endpoint.
@@ -155,8 +161,7 @@ async def configure(
# Create room properties
room_properties = DailyRoomProperties(
exp=expiration_time,
eject_at_room_exp=True,
exp=expiration_time, eject_at_room_exp=True, enable_recording=enable_recording
)
# Add SIP configuration if enabled
@@ -173,7 +178,10 @@ async def configure(
room_properties.start_video_off = not sip_enable_video # Voice-only by default
# Create room parameters
room_params = DailyRoomParams(name=room_name, properties=room_properties)
if daily_room_properties:
room_params = DailyRoomParams(name=room_name, properties=daily_room_properties)
else:
room_params = DailyRoomParams(name=room_name, properties=room_properties)
try:
room_response = await daily_rest_helper.create_room(room_params)