Skip to content

Command Palette

Search for a command to run...

Voice API

Studio-quality text-to-speech in 40+ languages with controls for emotion, pacing and pronunciation — plus instant voice cloning from as little as 60 seconds of reference audio.

Generate speech

POST/v1/voice/speech

Returns audio bytes directly. Short inputs (< 1,000 characters) respond in near real time; longer inputs run as async jobs with a webhook on completion.

terminalbash
curl https://api.Sparko.ai/v1/voice/speech \
  -H "Authorization: Bearer $Sparko_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Sparko-voice-2",
    "voice": "aria",
    "input": "Your export is ready — twelve thousand rows, zero errors.",
    "emotion": "warm",
    "format": "mp3"
  }' \
  --output speech.mp3
app/speech.tstypescript
const audio = await client.voice.speech.create({
  model: "Sparko-voice-2",
  voice: "aria",
  input: "Your export is ready — twelve thousand rows, zero errors.",
  emotion: "warm",
  format: "mp3",
});

await fs.promises.writeFile("speech.mp3", Buffer.from(await audio.arrayBuffer()));

Request parameters

ParameterTypeDescription
modelstring В· requiredSparko-voice-2 or the low-latency Sparko-voice-2-turbo.
voicestring · requiredA stock voice ID (see below) or a clone ID like vc_7d21….
inputstring В· requiredText to speak, up to 40,000 characters per request.
emotionstring В· default neutralneutral, warm, energetic or calm.
speednumber · 0.5–2.0 · default 1.0Playback pacing multiplier.
formatstring В· default mp3mp3, wav, flac or pcm (24kHz).

Stock voices

VoiceCharacterLanguages
ariaWarm, conversational female42
atlasDeep, confident male narrator42
novaBright, energetic product voice38
sageMeasured, documentary tone35

Voice cloning

POST/v1/voice/clones

Upload 60 seconds or more of clean reference audio to create a reusable clone. Clones are private to your workspace and usable anywhere a voice parameter is accepted.

app/clone.tstypescript
const clone = await client.voice.clones.create({
  name: "Lead instructor — course narration",
  files: [fs.createReadStream("./reference.wav")],
  consent_token: "cst_91ae4b", // signed consent from the voice owner
});

// -> { id: "vc_7d21f0", status: "ready", name: "Lead instructor — ..." }
Cloning requires a signed consent_tokenproving the speaker's permission. Cloning a voice without consent violates our acceptable use policy and results in immediate suspension.

Credits

Speech costs 1 credit per 1,000 characters of input. Sparko-voice-2-turbo costs 0.5 credits per 1,000 characters. Creating a clone is a one-time 25 credits; using it is billed like any other voice. AI Voice requires a Pro plan or above — see pricing.