How do I generate an AI voice audio from text?
Ask Max, for example "record an audio in Raquel's voice saying: Hi, Ana! I saw you signed up for our webinar…". Max generates the audio, saves it at a public address and returns the link. Through the public API or the Clickmax MCP, the same request is the speech_generate tool.
Before you start:
- Role: you need the Voz com IA (AI voice) permission. Anyone who already chats with Max gets it too.
- The Voz com IA feature must be on in the workspace modules, under the IA module.
- The audio lives at a public address: anyone with the link can listen. Do not record information that cannot be public.
- A text has up to 4,000 characters, about 4 minutes of audio.
1. Pick the voice
Without a voice, the workspace default voice is used, set under Max > Vozes (Voices). Clickmax voices speak Brazilian Portuguese with a native accent and work with any model. Voices trained by your team are also listed, with their own id (How do I train an AI voice?).
Through the API or MCP, the speech_voices_list tool returns the Clickmax voices, the trained ones and the workspace default. Under Max > Vozes you can listen to each one.
2. Pick the model
Without a model, the workspace default model is used (clickmax/voice at first).
3. Pick the format
4. Use the link
The response carries the audio address (url), the file type and how many characters were generated. Generate once and reuse the link: every request generates a new audio.
Related
- What is Max (AI)?
- How do I train an AI voice?
- Clickmax API
- How do I connect my AI to Clickmax with OAuth?
If it did not work
- 403 response: your role lacks the Voz com IA permission, or the feature is off in the workspace.
- 400 response with a trained voice: the voice was deleted or belongs to another workspace. Check the id in
speech_voices_list. - 429 response: too many requests at once. Wait a few seconds and try again.
- 502 response: generating or saving the audio failed. Try again in a few minutes.
- WhatsApp shows the audio as a file instead of a voice note: generate it with the
opusformat.