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_client import OjinClient

avatar = OjinClient(
        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

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

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

  • OjinCancelInteractionMessage: Message to cancel an interaction

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

  • OjinInteractionResponseMessage: 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.3.tar.gz (140.7 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.3-py3-none-any.whl (141.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ojin_client-0.6.3.tar.gz
  • Upload date:
  • Size: 140.7 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.3.tar.gz
Algorithm Hash digest
SHA256 db1b861443836187f4ae8a50e81da6aee28253d2ac731efee70a629e9c062502
MD5 20e60288f1a85a77d089972050aa7e32
BLAKE2b-256 f92a2db4910990749e5f1bffec51a1e5daec81ca95cb1fde968a283b000433cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ojin_client-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 141.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 18cfd6c6b6a2c895358c2c92f39a8ebd9e2b734ef5b3b93de421f95fb0ad71d2
MD5 12324174b8339204e520c2e59edf9986
BLAKE2b-256 d156e3e88edda0ff95171a860d93b27eb0936347ae4fa3989b3e44e9c07e13cb

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