0.2.4 • Published 7 months ago
@audentic/react v0.2.4
@audentic/react
React components for integrating Audentic voice agents into your application.
Installation
npm install @audentic/react
Overview
@audentic/react provides React components and hooks for integrating voice agents into your React applications. It allows you to easily add interactive voice conversations to your web interface.
Getting Started
- Create your voice agent at audentic.io
- Copy your agent ID from the dashboard
- Install and integrate with the React component
Basic Usage
The SessionControl
component provides a complete interface for voice interactions with your Audentic agent.
import { SessionControl } from "@audentic/react";
function App() {
return <SessionControl agentId="your-agent-id" />;
}
Props
SessionControl
Prop | Type | Default | Description |
---|---|---|---|
agentId | string | Required | Your Audentic agent ID |
transcript | boolean | false | Show conversation transcript |
sessionControlHeight | number | - | Custom height for the control panel (px) |
sessionControlWidth | number | - | Custom width for the control panel (px) |
Features
- Real-time voice communication
- Optional conversation transcript
- Customizable dimensions
- Error handling with toast notifications
- Connection status indicators