API reference
Hooks
React hooks for accessing Pipecat client functionality
The Pipecat React SDK provides hooks for accessing client functionality, managing media devices, and handling events.
useRTVIClient
Provides access to the RTVIClient instance originally passed to RTVIClientProvider.
useRTVIClientEvent
Allows subscribing to RTVI client events. It is advised to wrap handlers with useCallback
.
Arguments
event
(RTVIEvent, required)handler
(function, required)
useRTVIClientMediaDevices
Manage and list available media devices.
useRTVIClientMediaTrack
Access audio and video tracks.
Arguments
trackType
(“audio” | “video”, required)participantType
(“bot” | “local”, required)
useRTVIClientTransportState
Returns the current transport state.