Skip to main content

Ojin platform services

Project description

Ojin Speech-To-Video Client

A WebSocket client for Ojin STV model that handles communication with Inference Server. It is used for example by Ojin Video Service for Pipecat https://github.com/pipecat-ai/pipecat

Requirements

  • Python 3.10+
  • pip or uv package manager

Installation

pip install ojin-client

Usage

from ojin.ojin_stv_client import OjinSTVClient

avatar = OjinSTVClient(
        ws_url="THE_OJIN_URL",
        api_key="YOUR_OJIN_API_KEY",
        avatar_config_id="YOUR_OJIN_CONFIGURATION"M
    )

API methods

  • connect: Establishes the websocket connection with the ojin inference server
  • start_interaction: Creates a UUID to send in the interaction messages
  • send_message: Sends messages to the ojin inference server
  • receive_message: Receives messages from the ojin inference server
  • close: closes the connection with ojin inference server

Messages

  • OjinSTVInteractionReadyMessage: Message indicating that an interaction is ready to begin

  • OjinSTVSessionReadyMessage: Message to start a new interaction with an Ojin Persona

  • OjinSTVCancelInteractionMessage: Message to cancel an interaction

  • OjinSTVInteractionInputMessage: Contains the audio data as bytes and a flag indicating if this is the last input

Responses

  • StartInteractionResponseMessage: Response message for a successful interaction start

  • OjinSTVInteractionResponseMessage: Response message containing video data from the avatar

  • ErrorResponseMessage: Response message informing the client there was an error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ojin_client-0.6.0.tar.gz (140.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ojin_client-0.6.0-py3-none-any.whl (140.9 kB view details)

Uploaded Python 3

File details

Details for the file ojin_client-0.6.0.tar.gz.

File metadata

  • Download URL: ojin_client-0.6.0.tar.gz
  • Upload date:
  • Size: 140.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ojin_client-0.6.0.tar.gz
Algorithm Hash digest
SHA256 0a62c774e73ab2cf9d01c6b44ab090e3bf765157f16fc67a9d5e68ca9e39d7cd
MD5 b5a4040a53ae4170f5ef8008e100a904
BLAKE2b-256 65c71d7b613c5d41a7eed46df78aa3238d9b815f0dae3a1d7792770962feaf31

See more details on using hashes here.

File details

Details for the file ojin_client-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: ojin_client-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 140.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ojin_client-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b59294a6230858e156c3d01ba316f04e63fb4b56bd97e609e7e3be5c47943cfe
MD5 12c75dfa78bc210fd50eeaf8699bf35a
BLAKE2b-256 8d4aeb66e990e5917daa3cf71d52676a3771173f8c9b61f0f18affebfd02d773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page