You are currently viewing the React version of this page. Use the dropdown to the right to customize this page for your client framework.
This guide walks through building a React voice app without any UI abstractions — just the Pipecat React SDK directly. You’ll see exactly how the client, provider, hooks, and audio output fit together, which is useful whether you’re building a fully custom UI or want to understand what the CLI-generated app is doing under the hood.
Prerequisites
- Node.js 18+
- A running Pipecat bot
Don't have a bot yet?
Follow the Pipecat server quickstart to get a bot running locally at
http://localhost:7860.Installation
Create a new React project and install the SDK, React bindings, and SmallWebRTC transport:
SmallWebRTC is ideal for development — no third-party account needed.
For production, swap in the Daily transport,
which provides global infrastructure, echo cancellation, and more.
Step 1: Create the client
Create the Two things to note here:
PipecatClient once at the module level with SmallWebRTC as the transport. Pass it to PipecatClientProvider so every component in your app can access it. PipecatClientAudio mounts a hidden <audio> element for the bot’s voice output.Replace src/main.tsx with:PipecatClientProvidermakes the client available to all child components via hooks.PipecatClientAudiois a headless component that mounts the bot’s audio output. It needs to live inside the provider, but has no visible UI.
Step 2: Build the app
Replace
src/App.tsx with:Step 3: Run it
Start your Pipecat bot (if it isn’t already running), then start the app:http://localhost:5173, click Connect, allow microphone access, and start talking.What each piece does
Next steps
Session Lifecycle
Understand connection states, reconnection, and teardown
Events & Callbacks
The full event system — what fires, when, and how to handle it
Custom Messaging
Send and receive custom messages between client and bot
React SDK Reference
All hooks, components, and types