Platform
Voices and languages
An agent speaks one language in one voice. Both are settings on the agent, and both are chosen from lists the API serves, so your code never has to hard-code them.
Languages
Get the catalog lists the languages an agent can speak under languages. Each has an id, which is what you set as the agent’s voice.language, and an iso code.
curl "https://goblins-call-api.onrender.com/v1/catalog" \
-H "Authorization: Bearer $CRACKLE_API_KEY"Hindi, Hinglish and English lead the list, and many more follow. Hinglish is Hindi with English words mixed in, the way it is commonly spoken; choose it when callers move between the two in one sentence.
curl -X PATCH "https://goblins-call-api.onrender.com/v1/agents/ua_3f9a1c2b" \
-H "Authorization: Bearer $CRACKLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice": {
"language": "hinglish"
},
"stt": {
"language": "hi"
}
}'When you set a language through the API, set the agent’s stt.language to the same language’s iso code, so it listens for the language it speaks. The studio does both when you pick a language there. English is listened for either way.
Write the agent’s instructions in the language you want it to speak, or say in them which language to use. An agent with the changeLanguage built-in tool can also move between Hindi and English mid-call when the caller does.
One call in another language
The agent’s language is the one its calls start in. To hold a single call in a different one, send language when you start the call: a language’s id from the catalog, or its iso code. Nothing on the agent changes.
curl -X POST "https://goblins-call-api.onrender.com/v1/calls" \
-H "Authorization: Bearer $CRACKLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "ua_3f9a1c2b",
"language": "ta"
}'The agent keeps its voice and speaks that language in it, and it listens for that language as well as its own and English. Hindi and English need only a voice engine that speaks them. Any other language needs an agent with a cartesia voice and openai transcription; without them the request answers 400 UNSUPPORTED_LANGUAGE. A call in another language has the rest.
Voices
List voices is the voice library. Search it by name, narrow it to a language and a gender, and page through the results.
curl "https://goblins-call-api.onrender.com/v1/providers/voices?language=hi&gender=feminine&limit=10" \
-H "Authorization: Bearer $CRACKLE_API_KEY"Each voice has an id, a name, a short description, and preview, which says whether it has a sample you can listen to through Play a voice sample. Set the voice on an agent by its id:
curl -X PATCH "https://goblins-call-api.onrender.com/v1/agents/ua_3f9a1c2b" \
-H "Authorization: Bearer $CRACKLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice": {
"speaker": "VOICE_ID"
}
}'Shaping the delivery
voice.speednumber0.2–2How fast the agent speaks. 1 is the voice’s natural pace.
voice.volumenumber0.5–2How loud it is, with 1 as the voice’s own level.
voice.emotionstringA delivery such as calm, on engines that support emotions.
Engines that lack one of these controls ignore it. The best way to judge a change is to make it and press Test agent in the studio.