Skip to main content

Ojin platform services

Project description

Ojin Persona Client

A WebSocket client for Ojin Avatar model that handles communication with Inference Server. It is used for example by Ojin Persona 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_avatar_client import OjinAvatarClient

avatar = OjinAvatarClient(
        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
  • 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

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

  • OjinAvatarSessionReadyMessage: Message to start a new interaction with an Ojin Avatar

  • OjinAvatarCancelInteractionMessage: Message to cancel an interaction

  • OjinAvatarInteractionInputMessage: 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

  • OjinAvatarInteractionResponseMessage: 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.1.6.tar.gz (138.3 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.1.6-py3-none-any.whl (138.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ojin_client-0.1.6.tar.gz
  • Upload date:
  • Size: 138.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for ojin_client-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7b0ec66c5926cc5abf8f627c2a4c9c888dca7b72dae3fa3711e61e9fc04795cb
MD5 704ce23910967a4004d061ad3495dbf9
BLAKE2b-256 0c7011faae856cf7cb2e7b96d2a097a316b9cfa5460f4e5f8b69ef4a121eba1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ojin_client-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 138.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for ojin_client-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e1fc54fd7f610abe12bde707e6bdfe36676b85c8ac41707f17aed093df50eb89
MD5 1d010bd530bc620b524475608e327d2b
BLAKE2b-256 e26460ebe626d8d7749e07d7ec1fd36606abbbbc2a1cc4df69c1c486280633b4

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