Introduction

Overview

The Orga AI React Native SDK enables developers to integrate real-time audio and video interactions into Expo-based iOS and Android apps using WebRTC, a protocol for peer-to-peer multimedia communication. The SDK simplifies WebRTC by handling connections to the /v1/realtime/calls endpoint, allowing your app to send and receive audio or video streams with customizable responses for voice assistants, video calls, or interactive experiences.

Key Features

  • Multimodal Communication: Supports audio-only or audio+video streams, configurable based on your app’s needs.

  • Transcriptions: Provides transcriptions for user and AI audio, enhancing accessibility and interaction logging.

  • Customizable Responses: Configure voice, tone, and behavior (e.g., voice: "nova", instructions: "Respond in a friendly tone").

  • Cross-Platform: Build once for iOS and Android using Expo.

  • Automatic Call Management: Uses react-native-incall-manager to output audio to speakers or headphones (no developer configuration required).

Prerequisites

  • React Native: Version 0.78 or higher (supports auto-linking).

  • Dependencies:

    • react-native-webrtc: Install via npm install react-native-webrtc.

    • react-native-incall-manager: Install via npm install react-native-incall-manager.

  • Orga AI Credentials:

    • API key from the Orga AI dashboard.

    • Registered email (e.g., test@example.com).

  • Permissions:

    • Configure in app.json:

{
  "ios": {
    "bundleIdentifier": "com.test.orgaexample",
    "infoPlist": {
      "NSCameraUsageDescription": "Allow Orga to access your camera so you can show things to Orga",
      "NSMicrophoneUsageDescription": "Allow Orga to access your microphone so you can talk to Orga"
    }
  },
  "android": {
    "package": "com.test.orgaexample",
    "permissions": [
      "CAMERA",
      "RECORD_AUDIO",
      "android.permission.CAMERA",
      "android.permission.RECORD_AUDIO"
    ]
  }
}
  • Environment: Node.js and Expo CLI (npm install -g expo-cli).

  • Backend Proxy: Set up a server (e.g., Next.js API routes, Expo API routes, or a separate backend) to handle /v1/realtime/client-secrets and /v1/realtime/ice-config requests securely.

Getting Started

  1. Install dependencies react-native-webrtc, react-native-incall-manager) and configure permissions in app.json.

  2. Set up a backend proxy (e.g., Custom backend or Expo API routes) to fetch client secrets /v1/realtime/client-secrets) and ICE servers /v1/realtime/ice-config). See the Orga AI Quickstart for examples.

  3. Pass a fetchSessionConfig function to Orga.init to handle these requests, and the SDK will manage WebRTC connections to /v1/realtime/calls.

  4. Refer to the API Reference for endpoint details and request/response formats.

Versioning

Future releases may introduce breaking changes. Review changelogs and test beta releases to stay up to date.

Next Steps

Quick Start

An easy to follow guide to setup the SDK and incorporate Orga AI into your app

API Reference

Link to a page in the guide