Pipecat AI Small WebRTC Prebuilt

raw JSON →
2.5.0 verified Fri May 01 auth: no python

A simple, ready-to-use client for testing the SmallWebRTCTransport in the Pipecat AI framework. Version 2.5.0 requires Python >=3.10. Provides a prebuilt WebRTC client to quickly validate voice pipelines without building a full UI.

pip install pipecat-ai-small-webrtc-prebuilt
error ImportError: cannot import name 'SmallWebRTCTransport' from 'pipecat.transports.small_webrtc'
cause The import path changed in version 2.0. Old code uses the wrong module.
fix
Use: from pipecat.transports.services.adapters.small_webrtc import SmallWebRTCTransport
error ModuleNotFoundError: No module named 'pipecat_ai_small_webrtc_prebuilt'
cause The package is installed as pipecat-ai-small-webrtc-prebuilt (with hyphens), but Python imports use underscores.
fix
Install the package and then import using underscores: import pipecat_ai_small_webrtc_prebuilt
error KeyError: 'DAILY_API_KEY'
cause The environment variable is not set when creating the transport.
fix
Export DAILY_API_KEY and DAILY_URL or set them in code: os.environ['DAILY_API_KEY'] = 'your_key'
breaking Breaking change in 2.x: The import path for SmallWebRTCTransport changed from pipecat.transports.small_webrtc to pipecat.transports.services.adapters.small_webrtc.
fix Update your import to: from pipecat.transports.services.adapters.small_webrtc import SmallWebRTCTransport
deprecated The 'SmallWebRTCPrebuilt' class may be deprecated in favor of a unified client in future versions.
fix Check the Pipecat AI changelog before upgrading to next major version.
gotcha The prebuilt client requires both DAILY_API_KEY and DAILY_URL environment variables to be set, otherwise it will raise a ConfigurationError.
fix Set the environment variables or pass them directly to the transport constructor.

Initialize the prebuilt WebRTC client with a SmallWebRTCTransport. Requires DAILY_API_KEY and DAILY_URL environment variables.

import asyncio
from pipecat_ai_small_webrtc_prebuilt import SmallWebRTCPrebuilt
from pipecat.transports.services.adapters.small_webrtc import SmallWebRTCTransport

transport = SmallWebRTCTransport(
    api_key=os.environ.get('DAILY_API_KEY', ''),
    daily_url=os.environ.get('DAILY_URL', '')
)
client = SmallWebRTCPrebuilt(transport=transport)
asyncio.run(client.run())