v1

latestOpenAPI 3.0.02026-07-2451715.1 KB
Text-to-Speech

Sync TTS

Has a timeout of 90 seconds. If the process is not completed within that time, it will return a pending TTS Job just like the Async TTS.

post/api/v1/tts/sync

Request body

textstring required

Text to be converted to audio

speakerstring required

Speaker ID. You can retrieve speaker ID with Retrieve Speakers /api/v1/speakers API.

speakerStylestring

Speaker style id for the chosen speaker. You can retrieve speaker styles with /api/v1/speakers API. Only some of our speakers have multiple speaker styles.

speednumber

Speed of the audio to be generated

Example request

{
  "text": "Welcome to Genny!",
  "speaker": "640f477d2babeb0024be422b"
}

Response

It will return generated audio urls if job is successfully completed within 90 seconds. Otherwise it will return an incomplete TTS Job just like the Async TTS. Check the job status with Async Retrieve Job API using the returned id.

idstring mongoid required

Id of the job returned. This id will be later used to check the progress of the TTS job.

type'tts' | 'simple_tts' | 'dubbing' | 'localization' | 'subtitles' required

Type of the current job. Currently only TTS is supported.

status'in_progress' | 'done' required
progressnumber required
teamstring required
workspacestring
projectstring
createdAtstring date-time required

TTS requested time.

estimatedTimeAtstring date-time

Job estimated timestamp in milliseconds

estimatedTimeMsnumber

Job estimated time in milliseconds

Example response

{
  "id": "643e383551e2730025c5ae69"
}