TextToSpeech
Get voice preview
Inworld Voice API reference: get a short audio preview of a system or workspace voice. Previews are not billed.
/tts/v1/voice:previewPreview a system or workspace voice
Send GET https://api.inworld.ai/tts/v1/voice:preview with query parameters
voice_id and model_id, and the header Authorization: Basic <INWORLD_API_KEY>.
Use the exact voiceId returned by List voices.
System voice IDs such as Ashley work here.
curl --get 'https://api.inworld.ai/tts/v1/voice:preview' \
--header "Authorization: Basic $INWORLD_API_KEY" \
--data-urlencode 'voice_id=Ashley' \
--data-urlencode 'model_id=inworld-tts-2'The response is a single JSON object:
{"audioContent":"<base64-encoded MP3>"}Base64-decode audioContent to play or save the MP3. Preview text is selected by
the service and cannot be customized. Previews are not billed. To speak your own
text, use synthesis.
This preview uses the TTS endpoint and a voice_id query parameter. Do not
construct /voices/v1/voices/Ashley:preview or treat a system voice ID as a
workspace voice-management resource name. Voice metadata and synthesis use
different identifier shapes.
The identifier of the voice to preview. Use the List Voices endpoint to discover available voice IDs.
The identifier of the TTS model to use for generating the preview. See Models for available models.