npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

unotelos-rn-voice-sdk

v1.1.2

Published

React Native SDK for real-time AI voice conversations with Ultravox integration

Downloads

393

Readme

unotelos-rn-voice-sdk

A React Native SDK for real-time AI voice conversations with Ultravox integration.

Features

  • 🎤 Real-time voice conversations with AI assistants
  • 📱 Cross-platform support (iOS & Android)
  • 🎛️ Audio controls (mute/unmute)
  • 📡 Session management
  • 🌍 Multi-language support (English, Pidgin, Igbo, Hausa, Yoruba)
  • 🔧 Built with Kotlin for Android and Objective-C for iOS
  • ⚛️ TypeScript support

Installation

npm install unotelos-rn-voice-sdk

iOS Setup

  1. Run cd ios && pod install to install iOS dependencies
  2. Add microphone permissions to your Info.plist:
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access for voice conversations</string>

Android Setup

  1. Add microphone permissions to your android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  1. The native module will be automatically linked via React Native auto-linking.

Usage

Basic Example

import { VoiceSDK, VoiceSessionState } from 'unotelos-rn-voice-sdk';

// Initialize the SDK
const sdk = VoiceSDK.getInstance({
  baseUrl: 'https://your-backend-url.com/v1/api', // Optional: defaults to https://voice.scalercm.ai
  debug: __DEV__,
});

// Set up event listeners
sdk.setEventCallbacks({
  onStateChange: (state) => {
    console.log('Session state changed:', state);
  },
  onAudioStateChange: (audioState) => {
    console.log('Audio state changed:', audioState);
  },
  onError: (error) => {
    console.error('SDK Error:', error);
  },
});

// Start a voice session
await sdk.startSession({
  customerId: 'customer-123',
  customerName: 'John Doe',
  // ... other config
});

// Audio controls
await sdk.mute();
await sdk.unmute();

// End session
await sdk.endSession();

Using the VoiceSupportComponent

import React from 'react';
import { VoiceSupportComponent } from '@unotelos/rn-voice-sdk';

export default function App() {
  return (
    <VoiceSupportComponent
      customerData={{
        id: 'customer-123',
        name: 'John Doe',
        phone: '+1234567890',
        accountType: 'premium',
      }}
      backendUrl="https://your-backend-url.com"
      debug={__DEV__}
    />
  );
}

API Reference

VoiceSDK

Methods

  • getInstance(config: VoiceSDKConfig): VoiceSDK - Get singleton instance
  • setEventCallbacks(callbacks: VoiceSessionEvents): void - Set event callbacks
  • startSession(config: VoiceSessionConfig): Promise<void> - Start voice session
  • endSession(): Promise<void> - End current session
  • mute(): Promise<void> - Mute microphone
  • unmute(): Promise<void> - Unmute microphone
  • getSessionState(): VoiceSessionState - Get current session state
  • getAudioState(): AudioState - Get current audio state

Types

interface VoiceSDKConfig {
  backendUrl: string;
  debug?: boolean;
}

interface VoiceSessionConfig {
  customerId: string;
  customerName: string;
  customerPhone?: string;
  accountType?: string;
  metadata?: Record<string, any>;
}

enum VoiceSessionState {
  IDLE = 'idle',
  INITIALIZING = 'initializing',
  CONNECTED = 'connected',
  ENDING = 'ending',
  ERROR = 'error',
}

enum AudioState {
  MUTED = 'muted',
  UNMUTED = 'unmuted',
}

Development

Setting up Ultravox Integration

This SDK is designed to work with the Ultravox platform. To integrate with Ultravox:

  1. Android: Add the Ultravox Android SDK dependency to your app's build.gradle
  2. iOS: Add the Ultravox iOS SDK to your Podfile
  3. Update the native module code to use the actual Ultravox SDK APIs

Building the SDK

npm run clean
npm run prepare

Linting

npm run lint

Type Checking

npm run typecheck

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT © Unotelos