Skip to main content

Installation

Install the NextEVI Voice React SDK from npm:

Prerequisites

Before getting started, make sure you have:
You’ll need either:
  • API Key: Organization API key (starts with oak_)
  • Project ID: Your project identifier
  • Config ID: Voice configuration identifier
Or:
  • JWT Token: For user-based authentication
  • Config ID: Voice configuration identifier
Get these from your NextEVI Dashboard.
The SDK requires modern browsers with support for:
  • WebSocket API
  • Web Audio API (AudioContext)
  • MediaDevices API (getUserMedia)
  • AudioWorklet API
Supported browsers:
  • Chrome 66+
  • Firefox 76+
  • Safari 14.1+
  • Edge 79+
  • React 16.8+ (hooks support)
  • TypeScript support included

Quick Start

Here’s a complete example to get you started with voice conversations:
1

Set up the Provider

Wrap your app with the VoiceProvider:
2

Create the Voice Component

Use the useVoice hook for voice interactions:
3

Environment Variables (Optional)

For better security, use environment variables:
.env.local
Then update your component:

Authentication Methods

NextEVI supports two authentication methods:
Use your organization API key for server-side or trusted applications:
Never expose API keys in client-side code in production. Use JWT tokens for client applications.

Audio Configuration

Customize audio processing settings:

Error Handling

Handle common connection errors:

Development Utilities

Use built-in utilities for development and debugging:

Next Steps

Now that you have NextEVI running, explore more advanced features:

Hooks Reference

Learn about all available React hooks

Audio Configuration

Advanced audio processing options

Emotion Recognition

Access real-time emotion data

Examples

View complete working examples
Need help? Join our Discord community or contact support.