Convert text to natural-sounding audio using TTS models.WhollyAPI hosts text-to-speech models that convert text into natural-sounding audio. Browse all TTS models.
More APIs
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Convert text to natural-sounding audio using TTS models.WhollyAPI hosts text-to-speech models that convert text into natural-sounding audio. Browse all TTS models.
POST https://whollyapi.com/v1/inference/{model_name}
import requests
WHOLLYAPI_TOKEN = "$WHOLLYAPI_TOKEN"
MODEL = "hexgrad/Kokoro-82M"
response = requests.post(
f"https://whollyapi.com/v1/inference/{MODEL}",
headers={
"Authorization": f"Bearer {WHOLLYAPI_TOKEN}",
"Content-Type": "application/json",
},
json={
"text": "Hello! This is a text-to-speech example.",
},
)
# Save the returned audio
with open("output.wav", "wb") as f:
f.write(response.content)
curl -X POST \
-H "Authorization: Bearer $WHOLLYAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text": "Hello! This is a text-to-speech example."}' \
'https://whollyapi.com/v1/inference/hexgrad/Kokoro-82M' \
--output output.wav