voiceidvault
VoiceIDVault Python SDK — voice biometric authentication.
Installation
pip install voiceidvault
Quick start
from voiceidvault import VoiceIDVaultClient
client = VoiceIDVaultClient(api_key="your-api-key")
# ── 1. Enroll a new user ──────────────────────────────────────────────────────
session = client.init_enrollment("user-123", "+12125551234")
# User receives an SMS — collect the code and verify
sms_result = client.verify_sms_otp(session.session_id, "user-123", "654321")
print("SMS verified:", sms_result.verified, "next step:", sms_result.next_step)
# Enroll face
with open("face.jpg", "rb") as f:
face_result = client.enroll_face(session.session_id, "user-123", f.read())
print("Face enrolled, liveness score:", face_result.liveness_score)
# Enroll voice
with open("voice.wav", "rb") as f:
voice_result = client.enroll_voice(
session.session_id, "user-123", f.read(),
phrase="my voice is my password",
duration=5,
)
print("Voice quality score:", voice_result.quality_score)
# Complete enrollment
result = client.complete_enrollment(session.session_id, "user-123")
print("Vault ID:", result.vault_id)
print("Trust score:", result.trust_score)
# ── 2. Authenticate ───────────────────────────────────────────────────────────
with open("voice.wav", "rb") as f:
auth = client.authenticate_voice(
f.read(),
user_id="user-123", # optional — omit for open-set search
confidence_threshold=0.85,
)
if auth.verified:
print("Authenticated! Confidence:", auth.confidence)
print("Identity:", auth.identity.user_id if auth.identity else "unknown")
else:
analysis = auth.deepfake_analysis
if analysis and not analysis.passed:
print("Deepfake detected, confidence:", analysis.confidence)
# ── 3. GDPR right-to-erasure ──────────────────────────────────────────────────
deletion = client.request_deletion("erasure", reason="Account closure")
print("Deletion deadline:", deletion.request.response_deadline)
print("Next steps:", deletion.next_steps)
Context manager
with VoiceIDVaultClient(api_key="your-api-key") as client:
auth = client.authenticate_voice(audio_bytes)
print(auth.verified)
Error handling
from voiceidvault import (
VoiceIDVaultClient,
AuthenticationError,
EnrollmentError,
RateLimitError,
NetworkError,
)
try:
result = client.enroll_voice(session_id, user_id, audio_bytes)
except AuthenticationError as e:
print("Invalid API key:", e)
except EnrollmentError as e:
print(f"Enrollment failed [{e.code}]:", e)
except RateLimitError as e:
print(f"Rate limited — retry after {e.retry_after}s")
except NetworkError as e:
print("Network failure:", e)
Configuration
| Parameter | Default | Description |
|---|---|---|
api_key |
required | Your VoiceIDVault API key |
base_url |
https://voiceidvault.com |
Override the API base URL |
timeout |
30 |
Request timeout in seconds |
retries |
3 |
Retry attempts for 5xx / timeouts |
License
MIT
Metadata
Release files for voiceidvault 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| voiceidvault-1.1.0.tar.gz | 13.5 kB | Without provenance | Details for voiceidvault-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| voiceidvault-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for voiceidvault-1.1.0-py3-none-any.whl |
Total release size: 27.6 kB
Release files / voiceidvault-1.1.0.tar.gz
| Download URL | voiceidvault-1.1.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a690d37604798b969df740a079d80f6336f760e22c045af1c785524272a0ffd1
|
|
BLAKE2b-256 checksum How to use checksums |
60e6dfd1a7b7a58173ab4ef24350d7f8bb1b3a2b80ae15b1d77372e659aea564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / voiceidvault-1.1.0-py3-none-any.whl
| Download URL | voiceidvault-1.1.0-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c9a0ec14a90d918f4184996df64a10afcd1cff77e3c15f4234950ea0b5763e6
|
|
BLAKE2b-256 checksum How to use checksums |
93fc433f82ed35d7215b1e8f4692002be6d6dac3dc9e692bea6b53e8a3d0f04a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for voiceidvault 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.