Installation
Install the React SDK using your preferred package manager:Prerequisites
Before using the React SDK, you’ll need:- Outspeed API Key: Get your API key from the Outspeed Dashboard
- Backend Token Endpoint: A server endpoint to generate ephemeral keys for client authentication
Backend Setup
Environment Variables
Add your Outspeed API key to your server’s environment variables:Never expose your Outspeed API key in client-side code. Always generate ephemeral tokens on your backend server.
Session Configuration
The React SDK uses aSessionConfig
object to configure voice sessions:
Want to use a different voice? See all available voices you can choose from.
Configuration Options
Option | Type | Description |
---|---|---|
model | string | Must be "outspeed-v1" |
instructions | string | System prompt for the AI assistant |
voice | string | Voice ID to use for speech synthesis |
turn_detection | object | Voice activity detection settings |
first_message | string | Optional initial message from assistant |
You can find available voices here
Next Steps
Now that you have the SDK installed and configured, you can start building voice AI applications:- Basic Example - Learn how to create a simple voice conversation
- API Reference - Explore all available methods and events