Skip to main content

Text to Speech Quickstart

Learn how to generate speech from text using the Hamsa API.

Prerequisites

Generate Speech

curl -X POST https://api.tryhamsa.com/v1/jobs/text-to-speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, welcome to Hamsa.",
    "voice_id": "sarah",
    "model_id": "eleven_monolingual_v1"
  }' \
  --output speech.mp3