Get started

This guide explains how to integrate Oris Voice (ojin/oris-voice) into your applications using WebSockets.

Prerequisites

  1. An Ojin account with an active API key. If you don't have one, get your API key.

  2. Create a voice configuration or use an existing one.

  3. Save the Model Config ID from the dashboard.

Production deployments: Connect to the WebSocket API from a backend server to keep your API key secure. For end-user delivery, stream the generated audio through your own transport layer.

WebSocket Integration

Quick Example (Python)

This minimal example connects to Oris Voice, sends text, and saves the resulting audio as a WAV file.

Install dependencies:

pip install websockets python-dotenv

Create a .env file:

OJIN_API_KEY=your-api-key-here
OJIN_CONFIG_ID=your-config-id-here

Run the script:

Integration Flow

Streaming Playback

For real-time playback, process audio chunks as they arrive instead of waiting for the full response:

Feeding TTS Output to a Persona Model

A common pattern is to use Oris Voice to generate speech, then pipe that audio into ojin/oris-portrait for lip-synced video. In this setup:

  1. Send text to Oris Voice and receive streaming audio chunks

  2. Forward each audio chunk to the persona model as an InteractionInput (audio, payload type 1)

  3. Buffer the audio locally for playback

  4. Start audio playback when the persona model returns the first speech frame

Next Steps

API Reference

Dive deeper into the binary protocol and message formats.

API Reference →

Last updated

Was this helpful?