Skip to main content

Python SDK for the Open Voice Interaction Protocol (OpenVIP)

Project description

openvip

Open Voice Interaction Protocol (OpenVIP) HTTP API specification.

This API allows applications to send and receive voice interaction messages.

Base Path

The OpenVIP protocol defines relative paths only. The base path is implementation-defined — implementations choose where to mount these endpoints. The recommended base path is /openvip/.

Implementations SHOULD serve this OpenAPI spec at {base_path}/openapi.json for discovery (e.g. GET /openvip/openapi.json).

Quick Start

# Subscribe to messages (SSE) — this IS the registration
curl http://localhost:8770/openvip/agents/my-agent-id/messages

# Send a message to an agent
curl -X POST http://localhost:8770/openvip/agents/my-agent-id/messages \\
  -H \"Content-Type: application/json\" \\
  -d '{\"openvip\": \"1.0\", \"type\": \"transcription\", \"id\": \"uuid\", \"timestamp\": \"2026-02-06T10:30:00Z\", \"text\": \"hello\"}'

# Text-to-speech
curl -X POST http://localhost:8770/openvip/speech \\
  -H \"Content-Type: application/json\" \\
  -d '{\"openvip\": \"1.0\", \"type\": \"speech\", \"id\": \"uuid\", \"timestamp\": \"2026-02-06T10:30:05Z\", \"text\": \"hello world\", \"language\": \"en\"}'

Agent Lifecycle

Agents are ephemeral. An agent exists only while its SSE connection is open. No explicit registration is needed — connecting to the SSE endpoint registers the agent. Disconnecting automatically de-registers it.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.21.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://openvip.org

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openvip

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openvip

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import openvip
from openvip.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8770/openvip
# See configuration.py for a list of all supported configuration parameters.
configuration = openvip.Configuration(
    host = "http://localhost:8770/openvip"
)



# Enter a context with an instance of the API client
with openvip.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openvip.ControlApi(api_client)
    control_request = {"openvip":"1.0","id":"770e8400-e29b-41d4-a716-446655440000","command":"stt.stop"} # ControlRequest | 

    try:
        # Send control command
        api_response = api_instance.send_control(control_request)
        print("The response of ControlApi->send_control:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ControlApi->send_control: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:8770/openvip

Class Method HTTP request Description
ControlApi send_control POST /control Send control command
MessagesApi send_message POST /agents/{agent_id}/messages Send message to agent
MessagesApi subscribe_agent GET /agents/{agent_id}/messages Subscribe to agent messages (SSE)
SpeechApi stop_speech POST /speech/stop Stop TTS playback
SpeechApi text_to_speech POST /speech Text-to-speech request
StatusApi get_status GET /status Get engine status
StatusApi subscribe_status GET /status/stream Subscribe to status changes (SSE)

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

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

openvip-1.0.0rc10.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

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

openvip-1.0.0rc10-py3-none-any.whl (65.3 kB view details)

Uploaded Python 3

File details

Details for the file openvip-1.0.0rc10.tar.gz.

File metadata

  • Download URL: openvip-1.0.0rc10.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openvip-1.0.0rc10.tar.gz
Algorithm Hash digest
SHA256 587e8944654d5546d8f5ad7c6a398b60aee72ef2f91fb5a1a45905aff695680f
MD5 2c134e3062d3f316411d27789f8ea4fe
BLAKE2b-256 5c25a5d05344acd55852868870f2aab6e099284153aacfc1fbb27e46fc5b1b59

See more details on using hashes here.

Provenance

The following attestation bundles were made for openvip-1.0.0rc10.tar.gz:

Publisher: publish-python.yml on openvip-dev/sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openvip-1.0.0rc10-py3-none-any.whl.

File metadata

  • Download URL: openvip-1.0.0rc10-py3-none-any.whl
  • Upload date:
  • Size: 65.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openvip-1.0.0rc10-py3-none-any.whl
Algorithm Hash digest
SHA256 882bb0086d5ef9c65d9586c1692209bce1ef254fc8d1d518b1de3b2a7d6ad738
MD5 1172972488ec188bffa0a2f63247e436
BLAKE2b-256 225054b9cb66cc31d9f2ec2349f1d2ac7c069bafb28eae86a651050516aa5563

See more details on using hashes here.

Provenance

The following attestation bundles were made for openvip-1.0.0rc10-py3-none-any.whl:

Publisher: publish-python.yml on openvip-dev/sdks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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