Skip to content

Speech from Text

The Speech from Text card converts written text into spoken audio using a voice the agent already has. Pick the voice from GET /v1/agents/{agent_id}/voice/library (public catalog, designed, cloned, or connected voices) and pass its voice_id.

POST /v1/vidsheet/{id}/cells/{cell_id}/generate?agent_id={agent_id}
FieldTypeRequiredDescription
generation_typestringYes"speech_from_text".
data.textstringYesThe text to speak, 1–4000 characters.
data.voice_idstringYesA voice from the agent’s voice library.
data.enhance_voicebooleanNoPost-process for clarity. Default false.
data.remove_silencebooleanNoTrim leading/trailing silence. Default false.
Terminal window
curl -X POST "https://api.gen.pro/v1/vidsheet/101/cells/3000/generate?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"generation_type": "speech_from_text",
"data": {
"text": "Welcome back to another episode of our series.",
"voice_id": "pNInz6obpgDQGcFmaJgB",
"enhance_voice": true
}
}'

Poll Check generation status until complete. The finished generation includes the audio URL in output_resources.

{
"id": 9000,
"status": "completed",
"output_resources": [
{
"id": 1500,
"url": "https://cdn.gen.pro/outputs/voiceover-abc123.mp3",
"object_type": "audio",
"type": "output"
}
]
}

FieldTypeDescription
autoGeneratebooleanAuto-trigger generation when the text cell changes.

The voice is passed in the generation data parameter, not stored as a cell attribute.