Learn how to install and use the Mascotbot SDK with React.
MascotCall
component enables you to provide real-time call interaction features in your application. It offers you:
MascotRive
component.MascotCall
uses the Pipecat voice client alongside media handling and state management hooks from @mascotbot-sdk/react
.
MascotCall
works as a child of the MascotClient
component and must be wrapped in a valid client context. The typical integration flow is as follows:
useRive
hook (from @rive-app/react-canvas
).
"thumbs_up"
) to MascotClient
.
MascotClient
, add the MascotCall
component. Provide your API endpoint and TTS configuration (if needed) as props. Use the render prop function to access call controls and state.
MascotCall
component accepts the following props:
engine
(string): The TTS engine (e.g. "elevenlabs"
, "cartesia"
, or "kokoro"
).voice
(string): The identifier for the selected voice."disconnected"
, "connecting"
, "ready"
).
startProps
: Props to trigger a start call action.endProps
: Props to trigger the call-end action.muteProps
: Props to toggle mute/unmute.state
: The current transport state.muted
: Boolean indicating if the mic is muted.tts
prop you can define the TTS engine and voice settings. For example:
MascotCall
. This example shows how to set up your Rive instance, wrap your app with MascotClient
, and integrate the MascotCall
component with a custom UI using its render prop.