Skip to main content

A state-mirroring gateway for the Voxta conversational AI platform, providing high-level semantic APIs for downstream applications.

Project description

Voxta Gateway

Build codecov PyPI version Python versions License: MIT Ruff

A state-mirroring gateway for the Voxta conversational AI platform, providing high-level semantic APIs for downstream applications.

Overview

The Voxta Gateway is the single point of contact between the AI Streaming OS ecosystem and Voxta. It acts as a State-Mirror that observes Voxta state and broadcasts it to downstream applications, while providing Consumer-First APIs that only expose functionality actively used by registered consumers.

Key Features

  • Startup Order Independence: Apps can start in any order and receive state snapshots on connection
  • High-Level Semantic APIs: No downstream app needs to understand Voxta internals
  • Selective Event Streaming: Each app only receives events it subscribed to
  • Per-Client Observability: Debug UI shows traffic breakdown per connected app
  • Sentence Buffering: Processes reply chunks into complete sentences for TTS

Installation

pip install voxta-gateway

Or install from source:

git clone https://github.com/dion-labs/voxta-gateway.git
cd voxta-gateway/main
pip install -e ".[dev]"

Quick Start

# Start the gateway
VOXTA_URL=http://localhost:5384 uvicorn voxta_gateway.main:app --host 0.0.0.0 --port 8081

Or use the CLI:

voxta-gateway

API Overview

HTTP Endpoints

Endpoint Method Description
/health GET Health check and Voxta connection status
/state GET Current gateway state snapshot
/dialogue POST Send dialogue (user, game, twitch)
/context POST Send context update (not shown in chat)
/external_speaker_start POST Signal external speaker started
/external_speaker_stop POST Signal external speaker stopped
/tts_playback_start POST Signal TTS playback started
/tts_playback_complete POST Signal TTS playback completed

WebSocket

Connect to /ws and send a subscription message:

{
    "type": "subscribe",
    "client_id": "my-app",
    "events": ["dialogue_received", "ai_state_changed"]
}

Available events:

  • chat_started - A chat session became active (safe to send messages)
  • chat_closed - The chat session was closed (stop sending messages)
  • dialogue_received - User message, AI message, or game dialogue
  • sentence_ready - Complete sentence ready for TTS
  • ai_state_changed - AI state transition (idle/thinking/speaking)
  • external_speaker_started - External speaker began talking
  • external_speaker_stopped - External speaker finished talking
  • app_trigger - Expression/animation commands
  • characters_updated - Character list changed

Configuration

Environment variables:

Variable Default Description
VOXTA_URL http://localhost:5384 Voxta server URL
GATEWAY_PORT 8081 Gateway HTTP port
LOG_LEVEL INFO Logging level

Architecture

┌─────────────────┐       ┌──────────────────┐       ┌───────────────────┐
│     Voxta       │ ────> │  Voxta-Gateway   │ ────> │  Downstream Apps  │
│    (Brain)      │       │  (State Mirror)  │       │ (Decision Makers) │
└─────────────────┘       └──────────────────┘       └───────────────────┘
                                │
                                v
                         [Mirrored State]
                         - session_id
                         - chat_id
                         - characters[]
                         - ai_state
                         - external_speaker_active

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .

# Format code
ruff format .

License

MIT License - see LICENSE for details.

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

voxta_gateway-0.1.0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

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

voxta_gateway-0.1.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file voxta_gateway-0.1.0.tar.gz.

File metadata

  • Download URL: voxta_gateway-0.1.0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for voxta_gateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcf69100f1d5547aa12053bb46cccc53a37955babedfea60d68ff4d2192a133c
MD5 99d31089a5acc53ec9f212d51c4be982
BLAKE2b-256 5824d4c86019f3ffdc1569fafea6dc72fe24d0efcf98c10e00898503945e7d1c

See more details on using hashes here.

File details

Details for the file voxta_gateway-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: voxta_gateway-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for voxta_gateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4cda17c614cb4d4be75ebc0b7ae43f8c6a7058789f95b3d8dbc12990916ab6a
MD5 91f52442cbfc1d0d93ebb5f291eb4c42
BLAKE2b-256 04880488e2f7b4d9ba7f2951f5a88a6f610be92b0f576f65f4954e7144aa5dbb

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