Voices

Get voice preview

Fetch a short audio sample of a voice for voice pickers.

GET/v1/voices/{id}/preview

Returns a short audio sample of the voice, the preview_url from GET /v1/voices. Previews are free and don't count toward usage. Read-only keys can call it.

from wistfareai import WistfareAI

client = WistfareAI()  # reads WISTFARE_API_KEY

with open("amahoro-preview.mp3", "wb") as f:
    f.write(client.voices.preview("vc_9f2ae1"))

Path parameters

ParameterTypeDescription
idstringThe voice id, vc_….

Response

200 OK with the audio bytes; the Content-Type header gives the format. Previews of cloned voices are sent with Cache-Control: private, no-store, so don't cache them in shared caches.

Errors

StatusCodeMeaning
401unauthorizedMissing, invalid or revoked API key.
404not_foundNo voice with this id in the key's project.

On this page