API Reference
The Voxta Python client is designed to be intuitive and event-driven. The library is divided into high-level clients for general interaction and low-level data structures for message handling.
Primary Interfaces
If you are building an application, you will primarily interact with these two classes:
| Class | Purpose |
|---|---|
VoxtaClient |
The main entry point. Handles SignalR, chat sessions, and text-based interaction. |
VoxtaAudioClient |
specialized client for raw PCM audio streaming (STT/TTS). |
Data & Constants
The library uses strongly-typed models and constants to ensure reliable communication with the Voxta server.
- Models: Dataclasses for every message type (e.g.,
ClientSendMessage,ServerChatMessage). - Constants: Enumerations for
EventTypeandServiceType.
Architectural Overview
The client follows an asynchronous, event-driven pattern.
- Negotiate: Perform HTTP handshake to get a connection token.
- Connect: Establish the SignalR WebSocket connection.
- Listen: Subscribe to events like
message,appTrigger, orreplyStart. - Act: Send messages or trigger actions via asynchronous methods.
For a deep dive into the underlying protocol, see the Protocol Support Matrix.