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
Release files for ojin-client 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ojin_client-0.6.9.tar.gz | 144.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ojin_client-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 287.4 kB
Release files / ojin_client-0.6.9.tar.gz
| Download URL | ojin_client-0.6.9.tar.gz |
|---|---|
| Size | 144.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dc2714c7818c1fcbd611e86393bd646f17248b0b92713ac99551a2e1013f2c7
|
|
BLAKE2b-256 checksum How to use checksums |
83056fe6dde689d1b41a83dd50d33592993d42400989763804ff987a64c4a007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / ojin_client-0.6.9-py3-none-any.whl
| Download URL | ojin_client-0.6.9-py3-none-any.whl |
|---|---|
| Size | 143.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b317c97ceb2de1c3d72bb829df10554fc02aa89ba9ed4a3b0e19fa8da6a8b15
|
|
BLAKE2b-256 checksum How to use checksums |
27b5cdcf464ff5c604976106e06c761591c07e3aa932e26e23c80e90ac1074b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|