Skip to main content

Overview

The @tixae-labs/react-voice-orb package provides a React component that renders a voice orb widget. This component uses WebRTC for voice calls and WebGL for rendering the animated orb. It is designed for use in React applications and provides an easy-to-integrate solution.

Installation

Install the package using pnpm or npm:
Or

Usage

Prerequisites

  • Navigate to the Convocore Dashboard and create an agent.
  • Use the agent id and region parameters to start a voice call from the URL:
    1. agentId - The agent id is a unique identifier for the agent you want to call.
    2. region - The region is the region of the agent you want to call.
For example this URL:
  • The agentId is cj5lbhgMJHu4RLxmzM5Q and the region is eu.

Example usage with NextJS 13+ (App Router + TypeScript).

  1. Wrap the page/component with the VoiceProvider and OrbThemeProvider components.
Replace “agentId” and “region” with values from your Convocore Dashboard.
  1. Use the useAIVoice hook and the AudioAnimationOrb component to control the call and display the orb.

Sending Extra Messages to the Agent

You can append messages to the conversation by passing options parameters to .init() method, in addition to overriding tools or variables for the agent.

Notes:

  • This packages uses WebRTC to make the voice call, any browser that doesn’t support that might not be compatible with this package.
  • We use WebGL to render the orb, so it might not work on all devices/browsers.
If you have a bug report please open an issue on the GitHub Repository.