1.0.34 • Published 10 months ago

@hoosei/voxweave-react v1.0.34

Weekly downloads
-
License
SEE LICENSE IN ./...
Repository
github
Last release
10 months ago

Voxweave React

Voxweave is a customizable and interactive voice UI component for React applications. It provides a visually appealing interface for voice interactions, perfect for AI assistants, voice commands, or any audio-based user interface.

Features

  • 🎨 Customizable appearance and animations
  • 🌓 Light and dark mode support
  • 📱 Responsive design
  • 🎵 Real-time audio visualization
  • ⚡️ Optimized performance
  • 🔒 Type-safe
  • 🎮 Multiple positioning options

Installation

You can install Voxweave using npm, pnpm, or bun:

# Using npm
npm install @hoosei/voxweave-react

# Using pnpm
pnpm add @hoosei/voxweave-react

# Using bun
bun add @hoosei/voxweave-react

Quick Start

  1. First, wrap your application with the VoxweaveProvider:
import { VoxweaveProvider } from '@hoosei/voxweave-react'

function App() {
  return (
    <VoxweaveProvider 
      config={{
        licenseKey: process.env.NEXT_PUBLIC_VOXWEAVE_LICENSE_KEY!,
        apiUrl: process.env.NEXT_PUBLIC_VOXWEAVE_API_URL!,
        development: process.env.NODE_ENV === 'development'
      }}
    >
      <YourApp />
    </VoxweaveProvider>
  )
}
  1. Then use the Voxweave component in your application:
import { Voxweave } from '@hoosei/voxweave-react'

function YourComponent() {
  return (
    <Voxweave
      size={64}
      darkMode={false}
      position="bottom-right"
      isVertical={false}
      containerStyle="bottom"
      onStartCall={() => {
        // Handle call start
      }}
      onClose={() => {
        // Handle close
      }}
    />
  )
}

Configuration Options

VoxweaveProvider Props

PropTypeDescription
config.licenseKeystringYour Voxweave license key
config.apiUrlstringVoxweave API endpoint
config.developmentbooleanEnable development mode

Voxweave Component Props

PropTypeDefaultDescription
sizenumber64Size of the component in pixels
darkModebooleanfalseEnable dark mode
position'left' | 'right' | 'bottom-left' | 'bottom-right''bottom-right'Position of the component
isVerticalbooleanfalseEnable vertical layout
containerStyle'bottom' | 'center''bottom'Container positioning style
isVisiblebooleantrueControl component visibility
isAnimatedbooleantrueEnable animations
backgroundColorstring-Custom background color
disableBackgroundbooleanfalseRemove background
disableShadowbooleanfalseRemove shadow effect
onStartCall() => void-Callback when call starts
onClose() => void-Callback when component closes

Styling

Voxweave uses Tailwind CSS with a custom prefix to avoid conflicts. You can override styles using the className prop:

<Voxweave
  className="custom-class"
  // other props...
/>

Development

For local development, the provider automatically uses development credentials:

<VoxweaveProvider
  config={{
    development: true, // Uses development credentials
    apiUrl: 'http://localhost:4200/api'
  }}
>
  {/* Your app */}
</VoxweaveProvider>

License

This project is proprietary software owned by Hoosei Limited. See the LICENSE.md file in the root directory for details.

Hoosei® is a registered trademark, No. UK00003747539 of Hoosei Limited, 10 Upper Grosvenor Road, Tunbridge Wells, England, TN1 2EP. Registered England & Wales Company No. 13834192.

For licensing inquiries or permissions, please contact Hoosei Limited.

Importing

You can import the Voxweave components and functions as follows:

```javascript // Client-side imports import { Voxweave, useVoxweaveAuth } from ' @hoosei/voxweave-react';

// Server-side imports import { vox } from ' @hoosei/voxweave-react/server'; ```

For TypeScript users, you can also import types:

```typescript import type { AuthStatus, VoxweaveAuthOptions } from ' @hoosei/voxweave-react/server'; ```

1.0.83

6 months ago

1.0.82

6 months ago

1.0.81

6 months ago

1.0.79

6 months ago

1.0.78

6 months ago

1.0.77

6 months ago

1.0.76

6 months ago

1.0.75

6 months ago

1.0.74

6 months ago

1.0.73

9 months ago

1.0.72

9 months ago

1.0.71

9 months ago

1.0.70

9 months ago

1.0.69

9 months ago

1.0.68

9 months ago

1.0.67

9 months ago

1.0.66

9 months ago

1.0.64

9 months ago

1.0.63

9 months ago

1.0.61

9 months ago

1.0.60

9 months ago

1.0.59

9 months ago

1.0.58

9 months ago

1.0.57

9 months ago

1.0.56

9 months ago

1.0.55

9 months ago

1.0.54

9 months ago

1.0.53

9 months ago

1.0.52

9 months ago

1.0.51

9 months ago

1.0.50

9 months ago

1.0.49

9 months ago

1.0.48

9 months ago

1.0.47

9 months ago

1.0.46

9 months ago

1.0.45

9 months ago

1.0.44

9 months ago

1.0.43

9 months ago

1.0.42

9 months ago

1.0.41

10 months ago

1.0.40

10 months ago

1.0.39

10 months ago

1.0.38

10 months ago

1.0.37

10 months ago

1.0.36

10 months ago

1.0.35

10 months ago

1.0.34

10 months ago

1.0.33

10 months ago

1.0.32

10 months ago

1.0.31

10 months ago

1.0.30

10 months ago

1.0.29

10 months ago

1.0.28

10 months ago

1.0.27

10 months ago

1.0.26

10 months ago

1.0.25

10 months ago

1.0.24

10 months ago

1.0.23

10 months ago

1.0.22

10 months ago

1.0.21

10 months ago

1.0.20

10 months ago

1.0.19

10 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago