Vocalix.ai
ALL SYSTEMS NORMALSIGN INSTART FREE

Testing

Deterministic testing

A vx_test_ key takes the stub backend: free, zero GPU, no wallet debit, and byte-identical output for identical input. That is what makes snapshot tests stop flaking.

What the output depends on

Change any one of these and the bytes change. Change nothing and they do not.

textAfter whitespace normalisation
voice_idThe resolved voice
modelThe resolved version, not the alias you sent
output_formatcontainer and rate
speedfloat
pitchsemitones
seedinteger

In CI

import hashlib, os, requests

KEY = os.environ["VOCALIX_TEST_KEY"]   # vx_test_…

def synth(seed):
    r = requests.post(
        "https://api.vocalix.ai/v1/tts",
        headers={"Authorization": f"Bearer {KEY}"},
        json={"text": "Namaste", "voice_id": "meera-hi",
              "model": "echo-1.0.0", "seed": seed},
    )
    r.raise_for_status()
    return hashlib.sha256(r.content).hexdigest()


def test_same_seed_is_byte_identical():
    assert synth(42) == synth(42)


def test_seed_actually_changes_output():
    assert synth(42) != synth(43)
✓ pin the exact version, not the alias✓ test keys never debit the wallet✓ free forever, no expiry

Pin echo-1.0.0 rather than echo-1 in tests. Aliases move when a new version ships; exact versions never do, so a snapshot pinned to one cannot be invalidated by a release. See the reference for how default_model_pin freezes a whole key.