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.10
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.10.tar.gz | 144.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ojin_client-0.6.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 287.4 kB
Release files / ojin_client-0.6.10.tar.gz
| Download URL | ojin_client-0.6.10.tar.gz |
|---|---|
| Size | 144.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44a4ea68465f9fef90f136eb31fa1ebe59923d72b241761e4861329883f615e4
|
|
BLAKE2b-256 checksum How to use checksums |
b4a4d30b224d36ee868e8db21de85897c63809d4badccfd914c9635e72ed2085
|
| 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.10-py3-none-any.whl
| Download URL | ojin_client-0.6.10-py3-none-any.whl |
|---|---|
| Size | 143.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4d919f6bdc23472c796c943c3f9183691a2c8dd715a3c1150b87b7178cd812b
|
|
BLAKE2b-256 checksum How to use checksums |
8e564ac60070c6122eca1b49f165ff793f48630a0e645d8a644223f9e68bbd93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|