SAGEA LogoDocs & API
Getting Started

Synthesize speech with Sonus

Generate hyper-realistic speech with zero-shot voice cloning via POST https://api.sagea.space/v1/audio/speech.

  • Synthesize MP3/WAV in 30+ languages
  • Clone a voice from a 10-second sample
  • Stream for real-time playback (~200ms first byte)

Time to complete: ~5 minutes

Step 1: Basic synthesis

import os
import sagea
 
client = sagea.Client(api_key=os.environ["SAGEA_API_KEY"])
 
audio = client.audio.speech.create(
    model="sonus-tts",
    input="Welcome to SAGEA. Engineering intelligence that feels alive.",
    voice="nova",
    response_format="mp3",
)
 
audio.stream_to_file("output.mp3")

Step 2: Voice cloning

curl -X POST https://api.sagea.space/v1/audio/clone \
  -H "Authorization: Bearer $SAGEA_API_KEY" \
  -F name="custom_voice" \
  -F audio_samples=@"sample1.wav" \
  -F audio_samples=@"sample2.wav" \
  -F language="en-US"

Use the returned voice_id in /v1/audio/speech.

Step 3: Real-time streaming

For conversational AI, use WebSocket streaming at POST https://api.sagea.space/v1/audio/stream for sub-200ms first-byte latency with dynamic emotion shifting.

Verify

  • Check output.mp3 duration and sample_rate (16kHz / 24kHz / 44.1kHz).
  • Supported response_format: mp3, wav, ogg, flac.
  • Rate limits: 50 req/min (Starter), 500 req/min (Pro) for Sonus TTS.

What's next

On this page