Skip to main content

Installation

Requires Python 3.9+ and httpx. No audio processing dependencies — the SDK is a pure API client.

Initialisation

For async contexts (FastAPI, async Django, etc.):

Audio input

All methods that accept audio accept any of:

Methods

enroll(audio, user_id)

Returns EnrollResponse:

challenge(exclude_phrase?)

Returns ChallengeResponse:

verify(audio, *, voiceprint_id?, challenge_id?)

Returns VerifyResponse:

token(token_id, token_jwt?)

Pass token_jwt for authoritative JWT signature + expiry validation. Without it the endpoint returns a lightweight status check.

policy(token, action)


receipt(token, action, result, metadata?)


Error handling

All methods raise VoiceMarkError on failure:

Error codes


Context managers

Both clients implement context managers for connection pooling: