Text To Speech (Speak)

Design a voice from a prompt

Generate a brand-new synthetic voice from a text description (distinct from cloning, which copies a real person). Async: returns 202 with a design_id; poll GET /v1/voice/design/{id} for candidate previews, then POST /v1/voice/design/{id}/save to keep one. Send a stable Idempotency-Key when retrying create: the same organization and key receive the original response without another job or billable unit. Requires the speak:design scope.

post/v1/voice/design

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/voice/design
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Headers

Idempotency-Keystring

Customer-stable retry token. Reuse it only for retries of the same create request.

Request body

promptstring required

Natural-language description of the voice.

candidatesinteger

How many candidate voices to generate.

sample_textstring

Optional line the previews speak.

language'en' | 'zh' | 'ja' | 'ko' | 'de' | 'fr' | 'ru' | 'pt' | 'es' | 'it'

Language spoken by the preview. Other languages are not supported for voice design.

Response

Design job accepted

design_idstring
statusstring
candidatesinteger
estimated_secondsinteger

Example response

{
  "design_id": "dsn_a1b2c3",
  "status": "queued",
  "candidates": 3,
  "estimated_seconds": 25
}

Changes

No recorded changes to this operation across all 1 revision of this API.