dv-pipecat-ai 0.0.74.dev770__py3-none-any.whl → 0.0.82.dev776__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dv-pipecat-ai might be problematic. Click here for more details.

Files changed (244) hide show
  1. {dv_pipecat_ai-0.0.74.dev770.dist-info → dv_pipecat_ai-0.0.82.dev776.dist-info}/METADATA +137 -93
  2. dv_pipecat_ai-0.0.82.dev776.dist-info/RECORD +340 -0
  3. pipecat/__init__.py +17 -0
  4. pipecat/adapters/base_llm_adapter.py +36 -1
  5. pipecat/adapters/schemas/direct_function.py +296 -0
  6. pipecat/adapters/schemas/function_schema.py +15 -6
  7. pipecat/adapters/schemas/tools_schema.py +55 -7
  8. pipecat/adapters/services/anthropic_adapter.py +22 -3
  9. pipecat/adapters/services/aws_nova_sonic_adapter.py +23 -3
  10. pipecat/adapters/services/bedrock_adapter.py +22 -3
  11. pipecat/adapters/services/gemini_adapter.py +16 -3
  12. pipecat/adapters/services/open_ai_adapter.py +17 -2
  13. pipecat/adapters/services/open_ai_realtime_adapter.py +23 -3
  14. pipecat/audio/filters/base_audio_filter.py +30 -6
  15. pipecat/audio/filters/koala_filter.py +37 -2
  16. pipecat/audio/filters/krisp_filter.py +59 -6
  17. pipecat/audio/filters/noisereduce_filter.py +37 -0
  18. pipecat/audio/interruptions/base_interruption_strategy.py +25 -5
  19. pipecat/audio/interruptions/min_words_interruption_strategy.py +21 -4
  20. pipecat/audio/mixers/base_audio_mixer.py +30 -7
  21. pipecat/audio/mixers/soundfile_mixer.py +53 -6
  22. pipecat/audio/resamplers/base_audio_resampler.py +17 -9
  23. pipecat/audio/resamplers/resampy_resampler.py +26 -1
  24. pipecat/audio/resamplers/soxr_resampler.py +32 -1
  25. pipecat/audio/resamplers/soxr_stream_resampler.py +101 -0
  26. pipecat/audio/utils.py +194 -1
  27. pipecat/audio/vad/silero.py +60 -3
  28. pipecat/audio/vad/vad_analyzer.py +114 -30
  29. pipecat/clocks/base_clock.py +19 -0
  30. pipecat/clocks/system_clock.py +25 -0
  31. pipecat/extensions/voicemail/__init__.py +0 -0
  32. pipecat/extensions/voicemail/voicemail_detector.py +707 -0
  33. pipecat/frames/frames.py +590 -156
  34. pipecat/metrics/metrics.py +64 -1
  35. pipecat/observers/base_observer.py +58 -19
  36. pipecat/observers/loggers/debug_log_observer.py +56 -64
  37. pipecat/observers/loggers/llm_log_observer.py +8 -1
  38. pipecat/observers/loggers/transcription_log_observer.py +19 -7
  39. pipecat/observers/loggers/user_bot_latency_log_observer.py +32 -5
  40. pipecat/observers/turn_tracking_observer.py +26 -1
  41. pipecat/pipeline/base_pipeline.py +5 -7
  42. pipecat/pipeline/base_task.py +52 -9
  43. pipecat/pipeline/parallel_pipeline.py +121 -177
  44. pipecat/pipeline/pipeline.py +129 -20
  45. pipecat/pipeline/runner.py +50 -1
  46. pipecat/pipeline/sync_parallel_pipeline.py +132 -32
  47. pipecat/pipeline/task.py +263 -280
  48. pipecat/pipeline/task_observer.py +85 -34
  49. pipecat/pipeline/to_be_updated/merge_pipeline.py +32 -2
  50. pipecat/processors/aggregators/dtmf_aggregator.py +29 -22
  51. pipecat/processors/aggregators/gated.py +25 -24
  52. pipecat/processors/aggregators/gated_openai_llm_context.py +22 -2
  53. pipecat/processors/aggregators/llm_response.py +398 -89
  54. pipecat/processors/aggregators/openai_llm_context.py +161 -13
  55. pipecat/processors/aggregators/sentence.py +25 -14
  56. pipecat/processors/aggregators/user_response.py +28 -3
  57. pipecat/processors/aggregators/vision_image_frame.py +24 -14
  58. pipecat/processors/async_generator.py +28 -0
  59. pipecat/processors/audio/audio_buffer_processor.py +78 -37
  60. pipecat/processors/consumer_processor.py +25 -6
  61. pipecat/processors/filters/frame_filter.py +23 -0
  62. pipecat/processors/filters/function_filter.py +30 -0
  63. pipecat/processors/filters/identity_filter.py +17 -2
  64. pipecat/processors/filters/null_filter.py +24 -1
  65. pipecat/processors/filters/stt_mute_filter.py +56 -21
  66. pipecat/processors/filters/wake_check_filter.py +46 -3
  67. pipecat/processors/filters/wake_notifier_filter.py +21 -3
  68. pipecat/processors/frame_processor.py +488 -131
  69. pipecat/processors/frameworks/langchain.py +38 -3
  70. pipecat/processors/frameworks/rtvi.py +719 -34
  71. pipecat/processors/gstreamer/pipeline_source.py +41 -0
  72. pipecat/processors/idle_frame_processor.py +26 -3
  73. pipecat/processors/logger.py +23 -0
  74. pipecat/processors/metrics/frame_processor_metrics.py +77 -4
  75. pipecat/processors/metrics/sentry.py +42 -4
  76. pipecat/processors/producer_processor.py +34 -14
  77. pipecat/processors/text_transformer.py +22 -10
  78. pipecat/processors/transcript_processor.py +48 -29
  79. pipecat/processors/user_idle_processor.py +31 -21
  80. pipecat/runner/__init__.py +1 -0
  81. pipecat/runner/daily.py +132 -0
  82. pipecat/runner/livekit.py +148 -0
  83. pipecat/runner/run.py +543 -0
  84. pipecat/runner/types.py +67 -0
  85. pipecat/runner/utils.py +515 -0
  86. pipecat/serializers/base_serializer.py +42 -0
  87. pipecat/serializers/exotel.py +17 -6
  88. pipecat/serializers/genesys.py +95 -0
  89. pipecat/serializers/livekit.py +33 -0
  90. pipecat/serializers/plivo.py +16 -15
  91. pipecat/serializers/protobuf.py +37 -1
  92. pipecat/serializers/telnyx.py +18 -17
  93. pipecat/serializers/twilio.py +32 -16
  94. pipecat/services/ai_service.py +5 -3
  95. pipecat/services/anthropic/llm.py +113 -43
  96. pipecat/services/assemblyai/models.py +63 -5
  97. pipecat/services/assemblyai/stt.py +64 -11
  98. pipecat/services/asyncai/__init__.py +0 -0
  99. pipecat/services/asyncai/tts.py +501 -0
  100. pipecat/services/aws/llm.py +185 -111
  101. pipecat/services/aws/stt.py +217 -23
  102. pipecat/services/aws/tts.py +118 -52
  103. pipecat/services/aws/utils.py +101 -5
  104. pipecat/services/aws_nova_sonic/aws.py +82 -64
  105. pipecat/services/aws_nova_sonic/context.py +15 -6
  106. pipecat/services/azure/common.py +10 -2
  107. pipecat/services/azure/image.py +32 -0
  108. pipecat/services/azure/llm.py +9 -7
  109. pipecat/services/azure/stt.py +65 -2
  110. pipecat/services/azure/tts.py +154 -23
  111. pipecat/services/cartesia/stt.py +125 -8
  112. pipecat/services/cartesia/tts.py +102 -38
  113. pipecat/services/cerebras/llm.py +15 -23
  114. pipecat/services/deepgram/stt.py +19 -11
  115. pipecat/services/deepgram/tts.py +36 -0
  116. pipecat/services/deepseek/llm.py +14 -23
  117. pipecat/services/elevenlabs/tts.py +330 -64
  118. pipecat/services/fal/image.py +43 -0
  119. pipecat/services/fal/stt.py +48 -10
  120. pipecat/services/fireworks/llm.py +14 -21
  121. pipecat/services/fish/tts.py +109 -9
  122. pipecat/services/gemini_multimodal_live/__init__.py +1 -0
  123. pipecat/services/gemini_multimodal_live/events.py +83 -2
  124. pipecat/services/gemini_multimodal_live/file_api.py +189 -0
  125. pipecat/services/gemini_multimodal_live/gemini.py +218 -21
  126. pipecat/services/gladia/config.py +17 -10
  127. pipecat/services/gladia/stt.py +82 -36
  128. pipecat/services/google/frames.py +40 -0
  129. pipecat/services/google/google.py +2 -0
  130. pipecat/services/google/image.py +39 -2
  131. pipecat/services/google/llm.py +176 -58
  132. pipecat/services/google/llm_openai.py +26 -4
  133. pipecat/services/google/llm_vertex.py +37 -15
  134. pipecat/services/google/rtvi.py +41 -0
  135. pipecat/services/google/stt.py +65 -17
  136. pipecat/services/google/test-google-chirp.py +45 -0
  137. pipecat/services/google/tts.py +390 -19
  138. pipecat/services/grok/llm.py +8 -6
  139. pipecat/services/groq/llm.py +8 -6
  140. pipecat/services/groq/stt.py +13 -9
  141. pipecat/services/groq/tts.py +40 -0
  142. pipecat/services/hamsa/__init__.py +9 -0
  143. pipecat/services/hamsa/stt.py +241 -0
  144. pipecat/services/heygen/__init__.py +5 -0
  145. pipecat/services/heygen/api.py +281 -0
  146. pipecat/services/heygen/client.py +620 -0
  147. pipecat/services/heygen/video.py +338 -0
  148. pipecat/services/image_service.py +5 -3
  149. pipecat/services/inworld/__init__.py +1 -0
  150. pipecat/services/inworld/tts.py +592 -0
  151. pipecat/services/llm_service.py +127 -45
  152. pipecat/services/lmnt/tts.py +80 -7
  153. pipecat/services/mcp_service.py +85 -44
  154. pipecat/services/mem0/memory.py +42 -13
  155. pipecat/services/minimax/tts.py +74 -15
  156. pipecat/services/mistral/__init__.py +0 -0
  157. pipecat/services/mistral/llm.py +185 -0
  158. pipecat/services/moondream/vision.py +55 -10
  159. pipecat/services/neuphonic/tts.py +275 -48
  160. pipecat/services/nim/llm.py +8 -6
  161. pipecat/services/ollama/llm.py +27 -7
  162. pipecat/services/openai/base_llm.py +54 -16
  163. pipecat/services/openai/image.py +30 -0
  164. pipecat/services/openai/llm.py +7 -5
  165. pipecat/services/openai/stt.py +13 -9
  166. pipecat/services/openai/tts.py +42 -10
  167. pipecat/services/openai_realtime_beta/azure.py +11 -9
  168. pipecat/services/openai_realtime_beta/context.py +7 -5
  169. pipecat/services/openai_realtime_beta/events.py +10 -7
  170. pipecat/services/openai_realtime_beta/openai.py +37 -18
  171. pipecat/services/openpipe/llm.py +30 -24
  172. pipecat/services/openrouter/llm.py +9 -7
  173. pipecat/services/perplexity/llm.py +15 -19
  174. pipecat/services/piper/tts.py +26 -12
  175. pipecat/services/playht/tts.py +227 -65
  176. pipecat/services/qwen/llm.py +8 -6
  177. pipecat/services/rime/tts.py +128 -17
  178. pipecat/services/riva/stt.py +160 -22
  179. pipecat/services/riva/tts.py +67 -2
  180. pipecat/services/sambanova/llm.py +19 -17
  181. pipecat/services/sambanova/stt.py +14 -8
  182. pipecat/services/sarvam/tts.py +60 -13
  183. pipecat/services/simli/video.py +82 -21
  184. pipecat/services/soniox/__init__.py +0 -0
  185. pipecat/services/soniox/stt.py +398 -0
  186. pipecat/services/speechmatics/stt.py +29 -17
  187. pipecat/services/stt_service.py +47 -11
  188. pipecat/services/tavus/video.py +94 -25
  189. pipecat/services/together/llm.py +8 -6
  190. pipecat/services/tts_service.py +77 -53
  191. pipecat/services/ultravox/stt.py +46 -43
  192. pipecat/services/vision_service.py +5 -3
  193. pipecat/services/websocket_service.py +12 -11
  194. pipecat/services/whisper/base_stt.py +58 -12
  195. pipecat/services/whisper/stt.py +69 -58
  196. pipecat/services/xtts/tts.py +59 -2
  197. pipecat/sync/base_notifier.py +19 -0
  198. pipecat/sync/event_notifier.py +24 -0
  199. pipecat/tests/utils.py +73 -5
  200. pipecat/transcriptions/language.py +24 -0
  201. pipecat/transports/base_input.py +112 -8
  202. pipecat/transports/base_output.py +235 -13
  203. pipecat/transports/base_transport.py +119 -0
  204. pipecat/transports/local/audio.py +76 -0
  205. pipecat/transports/local/tk.py +84 -0
  206. pipecat/transports/network/fastapi_websocket.py +174 -15
  207. pipecat/transports/network/small_webrtc.py +383 -39
  208. pipecat/transports/network/webrtc_connection.py +214 -8
  209. pipecat/transports/network/websocket_client.py +171 -1
  210. pipecat/transports/network/websocket_server.py +147 -9
  211. pipecat/transports/services/daily.py +792 -70
  212. pipecat/transports/services/helpers/daily_rest.py +122 -129
  213. pipecat/transports/services/livekit.py +339 -4
  214. pipecat/transports/services/tavus.py +273 -38
  215. pipecat/utils/asyncio/task_manager.py +92 -186
  216. pipecat/utils/base_object.py +83 -1
  217. pipecat/utils/network.py +2 -0
  218. pipecat/utils/string.py +114 -58
  219. pipecat/utils/text/base_text_aggregator.py +44 -13
  220. pipecat/utils/text/base_text_filter.py +46 -0
  221. pipecat/utils/text/markdown_text_filter.py +70 -14
  222. pipecat/utils/text/pattern_pair_aggregator.py +18 -14
  223. pipecat/utils/text/simple_text_aggregator.py +43 -2
  224. pipecat/utils/text/skip_tags_aggregator.py +21 -13
  225. pipecat/utils/time.py +36 -0
  226. pipecat/utils/tracing/class_decorators.py +32 -7
  227. pipecat/utils/tracing/conversation_context_provider.py +12 -2
  228. pipecat/utils/tracing/service_attributes.py +80 -64
  229. pipecat/utils/tracing/service_decorators.py +48 -21
  230. pipecat/utils/tracing/setup.py +13 -7
  231. pipecat/utils/tracing/turn_context_provider.py +12 -2
  232. pipecat/utils/tracing/turn_trace_observer.py +27 -0
  233. pipecat/utils/utils.py +14 -14
  234. dv_pipecat_ai-0.0.74.dev770.dist-info/RECORD +0 -319
  235. pipecat/examples/daily_runner.py +0 -64
  236. pipecat/examples/run.py +0 -265
  237. pipecat/utils/asyncio/watchdog_async_iterator.py +0 -72
  238. pipecat/utils/asyncio/watchdog_event.py +0 -42
  239. pipecat/utils/asyncio/watchdog_priority_queue.py +0 -48
  240. pipecat/utils/asyncio/watchdog_queue.py +0 -48
  241. {dv_pipecat_ai-0.0.74.dev770.dist-info → dv_pipecat_ai-0.0.82.dev776.dist-info}/WHEEL +0 -0
  242. {dv_pipecat_ai-0.0.74.dev770.dist-info → dv_pipecat_ai-0.0.82.dev776.dist-info}/licenses/LICENSE +0 -0
  243. {dv_pipecat_ai-0.0.74.dev770.dist-info → dv_pipecat_ai-0.0.82.dev776.dist-info}/top_level.txt +0 -0
  244. /pipecat/{examples → extensions}/__init__.py +0 -0
@@ -20,11 +20,11 @@ from pydantic import BaseModel, Field, ValidationError
20
20
  class DailyRoomSipParams(BaseModel):
21
21
  """SIP configuration parameters for Daily rooms.
22
22
 
23
- Attributes:
24
- display_name: Name shown for the SIP endpoint
25
- video: Whether video is enabled for SIP
26
- sip_mode: SIP connection mode, typically 'dial-in'
27
- num_endpoints: Number of allowed SIP endpoints
23
+ Parameters:
24
+ display_name: Name shown for the SIP endpoint.
25
+ video: Whether video is enabled for SIP.
26
+ sip_mode: SIP connection mode, typically 'dial-in'.
27
+ num_endpoints: Number of allowed SIP endpoints.
28
28
  """
29
29
 
30
30
  display_name: str = "sw-sip-dialin"
@@ -38,6 +38,31 @@ class RecordingsBucketConfig(BaseModel):
38
38
 
39
39
  Refer to the Daily API documentation for more information:
40
40
  https://docs.daily.co/guides/products/live-streaming-recording/storing-recordings-in-a-custom-s3-bucket
41
+
42
+ Parameters:
43
+ bucket_name: Name of the S3 bucket for storing recordings.
44
+ bucket_region: AWS region where the S3 bucket is located.
45
+ assume_role_arn: ARN of the IAM role to assume for S3 access.
46
+ allow_api_access: Whether to allow API access to the recordings.
47
+ """
48
+
49
+ bucket_name: str
50
+ bucket_region: str
51
+ assume_role_arn: str
52
+ allow_api_access: bool = False
53
+
54
+
55
+ class TranscriptionBucketConfig(BaseModel):
56
+ """Configuration for storing Daily transcription in a custom S3 bucket.
57
+
58
+ Refer to the Daily API documentation for more information:
59
+ https://docs.daily.co/guides/products/live-streaming-recording/storing-recordings-in-a-custom-s3-bucket
60
+
61
+ Parameters:
62
+ bucket_name: Name of the S3 bucket for storing transcription.
63
+ bucket_region: AWS region where the S3 bucket is located.
64
+ assume_role_arn: ARN of the IAM role to assume for S3 access.
65
+ allow_api_access: Whether to allow API access to the transcription.
41
66
  """
42
67
 
43
68
  bucket_name: str
@@ -49,21 +74,24 @@ class RecordingsBucketConfig(BaseModel):
49
74
  class DailyRoomProperties(BaseModel, extra="allow"):
50
75
  """Properties for configuring a Daily room.
51
76
 
52
- Attributes:
53
- exp: Optional Unix epoch timestamp for room expiration (e.g., time.time() + 300 for 5 minutes)
54
- enable_chat: Whether chat is enabled in the room
55
- enable_prejoin_ui: Whether the pre-join UI is enabled
56
- enable_emoji_reactions: Whether emoji reactions are enabled
57
- eject_at_room_exp: Whether to remove participants when room expires
58
- enable_dialout: Whether SIP dial-out is enabled
59
- enable_recording: Recording settings ('cloud', 'local', 'raw-tracks')
60
- geo: Geographic region for room
61
- max_participants: Maximum number of participants allowed in the room
62
- sip: SIP configuration parameters
63
- sip_uri: SIP URI information returned by Daily
64
- start_video_off: Whether video is off by default
65
-
66
77
  Reference: https://docs.daily.co/reference/rest-api/rooms/create-room#properties
78
+
79
+ Parameters:
80
+ exp: Optional Unix epoch timestamp for room expiration (e.g., time.time() + 300 for 5 minutes).
81
+ enable_chat: Whether chat is enabled in the room.
82
+ enable_prejoin_ui: Whether the pre-join UI is enabled.
83
+ enable_emoji_reactions: Whether emoji reactions are enabled.
84
+ eject_at_room_exp: Whether to remove participants when room expires.
85
+ enable_dialout: Whether SIP dial-out is enabled.
86
+ enable_recording: Recording settings ('cloud', 'local', 'raw-tracks').
87
+ enable_transcription_storage: Whether transcription storage is enabled.
88
+ geo: Geographic region for room.
89
+ max_participants: Maximum number of participants allowed in the room.
90
+ recordings_bucket: Configuration for custom S3 bucket recordings.
91
+ transcription_bucket: Configuration for custom S3 bucket transcription.
92
+ sip: SIP configuration parameters.
93
+ sip_uri: SIP URI information returned by Daily.
94
+ start_video_off: Whether video is off by default.
67
95
  """
68
96
 
69
97
  exp: Optional[float] = None
@@ -73,9 +101,11 @@ class DailyRoomProperties(BaseModel, extra="allow"):
73
101
  eject_at_room_exp: bool = False
74
102
  enable_dialout: Optional[bool] = None
75
103
  enable_recording: Optional[Literal["cloud", "local", "raw-tracks"]] = None
104
+ enable_transcription_storage: Optional[bool] = None
76
105
  geo: Optional[str] = None
77
106
  max_participants: Optional[int] = None
78
107
  recordings_bucket: Optional[RecordingsBucketConfig] = None
108
+ transcription_bucket: Optional[TranscriptionBucketConfig] = None
79
109
  sip: Optional[DailyRoomSipParams] = None
80
110
  sip_uri: Optional[dict] = None
81
111
  start_video_off: bool = False
@@ -85,7 +115,7 @@ class DailyRoomProperties(BaseModel, extra="allow"):
85
115
  """Get the SIP endpoint URI if available.
86
116
 
87
117
  Returns:
88
- str: SIP endpoint URI or empty string if not available
118
+ SIP endpoint URI or empty string if not available.
89
119
  """
90
120
  if not self.sip_uri:
91
121
  return ""
@@ -96,10 +126,10 @@ class DailyRoomProperties(BaseModel, extra="allow"):
96
126
  class DailyRoomParams(BaseModel):
97
127
  """Parameters for creating a Daily room.
98
128
 
99
- Attributes:
100
- name: Optional custom name for the room
101
- privacy: Room privacy setting ('private' or 'public')
102
- properties: Room configuration properties
129
+ Parameters:
130
+ name: Optional custom name for the room.
131
+ privacy: Room privacy setting ('private' or 'public').
132
+ properties: Room configuration properties.
103
133
  """
104
134
 
105
135
  name: Optional[str] = None
@@ -110,14 +140,14 @@ class DailyRoomParams(BaseModel):
110
140
  class DailyRoomObject(BaseModel):
111
141
  """Represents a Daily room returned by the API.
112
142
 
113
- Attributes:
114
- id: Unique room identifier
115
- name: Room name
116
- api_created: Whether room was created via API
117
- privacy: Room privacy setting ('private' or 'public')
118
- url: Full URL for joining the room
143
+ Parameters:
144
+ id: Unique room identifier.
145
+ name: Room name.
146
+ api_created: Whether room was created via API.
147
+ privacy: Room privacy setting ('private' or 'public').
148
+ url: Full URL for joining the room.
119
149
  created_at: Timestamp of room creation in ISO 8601 format (e.g., "2019-01-26T09:01:22.000Z").
120
- config: Room configuration properties
150
+ config: Room configuration properties.
121
151
  """
122
152
 
123
153
  id: str
@@ -134,71 +164,40 @@ class DailyMeetingTokenProperties(BaseModel):
134
164
 
135
165
  Refer to the Daily API documentation for more information:
136
166
  https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token#properties
167
+
168
+ Parameters:
169
+ room_name: The room for which this token is valid. If not set, the token is valid for all rooms in your domain.
170
+ eject_at_token_exp: If True, the user will be ejected from the room when the token expires.
171
+ eject_after_elapsed: The number of seconds after which the user will be ejected from the room.
172
+ nbf: Not before timestamp - users cannot join with this token before this time.
173
+ exp: Expiration time (unix timestamp in seconds). Strongly recommended for security.
174
+ is_owner: If True, the token will grant owner privileges in the room.
175
+ user_name: The name of the user. This will be added to the token payload.
176
+ user_id: A unique identifier for the user. This will be added to the token payload.
177
+ enable_screenshare: If True, the user will be able to share their screen.
178
+ start_video_off: If True, the user's video will be turned off when they join the room.
179
+ start_audio_off: If True, the user's audio will be turned off when they join the room.
180
+ enable_recording: Recording settings for the token. Must be one of 'cloud', 'local' or 'raw-tracks'.
181
+ enable_prejoin_ui: If True, the user will see the prejoin UI before joining the room.
182
+ start_cloud_recording: Start cloud recording when the user joins the room.
183
+ permissions: Specifies the initial default permissions for a non-meeting-owner participant.
137
184
  """
138
185
 
139
- room_name: Optional[str] = Field(
140
- default=None,
141
- description="The room for which this token is valid. If not set, the token is valid for all rooms in your domain. You should always set room_name if using this token to control meeting access.",
142
- )
143
-
144
- eject_at_token_exp: Optional[bool] = Field(
145
- default=None,
146
- description="If `true`, the user will be ejected from the room when the token expires. Defaults to `false`.",
147
- )
148
- eject_after_elapsed: Optional[int] = Field(
149
- default=None,
150
- description="The number of seconds after which the user will be ejected from the room. If not provided, the user will not be ejected based on elapsed time.",
151
- )
152
-
153
- nbf: Optional[int] = Field(
154
- default=None,
155
- description="Not before. This is a unix timestamp (seconds since the epoch.) Users cannot join a meeting in with this token before this time.",
156
- )
157
-
158
- exp: Optional[int] = Field(
159
- default=None,
160
- description="Expiration time (unix timestamp in seconds). We strongly recommend setting this value for security. If not set, the token will not expire. Refer docs for more info.",
161
- )
162
- is_owner: Optional[bool] = Field(
163
- default=None,
164
- description="If `true`, the token will grant owner privileges in the room. Defaults to `false`.",
165
- )
166
- user_name: Optional[str] = Field(
167
- default=None,
168
- description="The name of the user. This will be added to the token payload.",
169
- )
170
- user_id: Optional[str] = Field(
171
- default=None,
172
- description="A unique identifier for the user. This will be added to the token payload.",
173
- )
174
- enable_screenshare: Optional[bool] = Field(
175
- default=None,
176
- description="If `true`, the user will be able to share their screen. Defaults to `true`.",
177
- )
178
- start_video_off: Optional[bool] = Field(
179
- default=None,
180
- description="If `true`, the user's video will be turned off when they join the room. Defaults to `false`.",
181
- )
182
- start_audio_off: Optional[bool] = Field(
183
- default=None,
184
- description="If `true`, the user's audio will be turned off when they join the room. Defaults to `false`.",
185
- )
186
- enable_recording: Optional[Literal["cloud", "local", "raw-tracks"]] = Field(
187
- default=None,
188
- description="Recording settings for the token. Must be one of `cloud`, `local` or `raw-tracks`.",
189
- )
190
- enable_prejoin_ui: Optional[bool] = Field(
191
- default=None,
192
- description="If `true`, the user will see the prejoin UI before joining the room.",
193
- )
194
- start_cloud_recording: Optional[bool] = Field(
195
- default=None,
196
- description="Start cloud recording when the user joins the room. This can be used to always record and archive meetings, for example in a customer support context.",
197
- )
198
- permissions: Optional[dict] = Field(
199
- default=None,
200
- description="Specifies the initial default permissions for a non-meeting-owner participant joining a call.",
201
- )
186
+ room_name: Optional[str] = None
187
+ eject_at_token_exp: Optional[bool] = None
188
+ eject_after_elapsed: Optional[int] = None
189
+ nbf: Optional[int] = None
190
+ exp: Optional[int] = None
191
+ is_owner: Optional[bool] = None
192
+ user_name: Optional[str] = None
193
+ user_id: Optional[str] = None
194
+ enable_screenshare: Optional[bool] = None
195
+ start_video_off: Optional[bool] = None
196
+ start_audio_off: Optional[bool] = None
197
+ enable_recording: Optional[Literal["cloud", "local", "raw-tracks"]] = None
198
+ enable_prejoin_ui: Optional[bool] = None
199
+ start_cloud_recording: Optional[bool] = None
200
+ permissions: Optional[dict] = None
202
201
 
203
202
 
204
203
  class DailyMeetingTokenParams(BaseModel):
@@ -206,6 +205,9 @@ class DailyMeetingTokenParams(BaseModel):
206
205
 
207
206
  Refer to the Daily API documentation for more information:
208
207
  https://docs.daily.co/reference/rest-api/meeting-tokens/create-meeting-token#body-params
208
+
209
+ Parameters:
210
+ properties: Meeting token configuration properties.
209
211
  """
210
212
 
211
213
  properties: DailyMeetingTokenProperties = Field(default_factory=DailyMeetingTokenProperties)
@@ -215,11 +217,6 @@ class DailyRESTHelper:
215
217
  """Helper class for interacting with Daily's REST API.
216
218
 
217
219
  Provides methods for creating, managing, and accessing Daily rooms.
218
-
219
- Args:
220
- daily_api_key: Your Daily API key
221
- daily_api_url: Daily API base URL (e.g. "https://api.daily.co/v1")
222
- aiohttp_session: Async HTTP session for making requests
223
220
  """
224
221
 
225
222
  def __init__(
@@ -229,7 +226,13 @@ class DailyRESTHelper:
229
226
  daily_api_url: str = "https://api.daily.co/v1",
230
227
  aiohttp_session: aiohttp.ClientSession,
231
228
  ):
232
- """Initialize the Daily REST helper."""
229
+ """Initialize the Daily REST helper.
230
+
231
+ Args:
232
+ daily_api_key: Your Daily API key.
233
+ daily_api_url: Daily API base URL (e.g. "https://api.daily.co/v1").
234
+ aiohttp_session: Async HTTP session for making requests.
235
+ """
233
236
  self.daily_api_key = daily_api_key
234
237
  self.daily_api_url = daily_api_url
235
238
  self.aiohttp_session = aiohttp_session
@@ -238,10 +241,10 @@ class DailyRESTHelper:
238
241
  """Extract room name from a Daily room URL.
239
242
 
240
243
  Args:
241
- room_url: Full Daily room URL
244
+ room_url: Full Daily room URL.
242
245
 
243
246
  Returns:
244
- str: Room name portion of the URL
247
+ Room name portion of the URL.
245
248
  """
246
249
  return urlparse(room_url).path[1:]
247
250
 
@@ -249,10 +252,10 @@ class DailyRESTHelper:
249
252
  """Get room details from a Daily room URL.
250
253
 
251
254
  Args:
252
- room_url: Full Daily room URL
255
+ room_url: Full Daily room URL.
253
256
 
254
257
  Returns:
255
- DailyRoomObject: DailyRoomObject instance for the room
258
+ DailyRoomObject instance for the room.
256
259
  """
257
260
  room_name = self.get_name_from_url(room_url)
258
261
  return await self._get_room_from_name(room_name)
@@ -261,13 +264,13 @@ class DailyRESTHelper:
261
264
  """Create a new Daily room.
262
265
 
263
266
  Args:
264
- params: Room configuration parameters
267
+ params: Room configuration parameters.
265
268
 
266
269
  Returns:
267
- DailyRoomObject: DailyRoomObject instance for the created room
270
+ DailyRoomObject instance for the created room.
268
271
 
269
272
  Raises:
270
- Exception: If room creation fails or response is invalid
273
+ Exception: If room creation fails or response is invalid.
271
274
  """
272
275
  headers = {"Authorization": f"Bearer {self.daily_api_key}"}
273
276
  json = params.model_dump(exclude_none=True)
@@ -298,19 +301,19 @@ class DailyRESTHelper:
298
301
  """Generate a meeting token for user to join a Daily room.
299
302
 
300
303
  Args:
301
- room_url: Daily room URL
302
- expiry_time: Token validity duration in seconds (default: 1 hour)
303
- eject_at_token_exp: Whether to eject user when token expires
304
- owner: Whether token has owner privileges
304
+ room_url: Daily room URL.
305
+ expiry_time: Token validity duration in seconds (default: 1 hour).
306
+ eject_at_token_exp: Whether to eject user when token expires.
307
+ owner: Whether token has owner privileges.
305
308
  params: Optional additional token properties. Note that room_name,
306
309
  exp, and is_owner will be set based on the other function
307
310
  parameters regardless of values in params.
308
311
 
309
312
  Returns:
310
- str: Meeting token
313
+ Meeting token.
311
314
 
312
315
  Raises:
313
- Exception: If token generation fails or room URL is missing
316
+ Exception: If token generation fails or room URL is missing.
314
317
  """
315
318
  if not room_url:
316
319
  raise Exception(
@@ -355,10 +358,10 @@ class DailyRESTHelper:
355
358
  """Delete a room using its URL.
356
359
 
357
360
  Args:
358
- room_url: Daily room URL
361
+ room_url: Daily room URL.
359
362
 
360
363
  Returns:
361
- bool: True if deletion was successful
364
+ True if deletion was successful.
362
365
  """
363
366
  room_name = self.get_name_from_url(room_url)
364
367
  return await self.delete_room_by_name(room_name)
@@ -367,13 +370,13 @@ class DailyRESTHelper:
367
370
  """Delete a room using its name.
368
371
 
369
372
  Args:
370
- room_name: Name of the room to delete
373
+ room_name: Name of the room to delete.
371
374
 
372
375
  Returns:
373
- bool: True if deletion was successful
376
+ True if deletion was successful.
374
377
 
375
378
  Raises:
376
- Exception: If deletion fails (excluding 404 Not Found)
379
+ Exception: If deletion fails (excluding 404 Not Found).
377
380
  """
378
381
  headers = {"Authorization": f"Bearer {self.daily_api_key}"}
379
382
  async with self.aiohttp_session.delete(
@@ -386,17 +389,7 @@ class DailyRESTHelper:
386
389
  return True
387
390
 
388
391
  async def _get_room_from_name(self, room_name: str) -> DailyRoomObject:
389
- """Internal method to get room details by name.
390
-
391
- Args:
392
- room_name: Name of the room
393
-
394
- Returns:
395
- DailyRoomObject: DailyRoomObject instance for the room
396
-
397
- Raises:
398
- Exception: If room is not found or response is invalid
399
- """
392
+ """Internal method to get room details by name."""
400
393
  headers = {"Authorization": f"Bearer {self.daily_api_key}"}
401
394
  async with self.aiohttp_session.get(
402
395
  f"{self.daily_api_url}/rooms/{room_name}", headers=headers