v1

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

Async TTS

Returns a TTS job. Check the job status with Async Retrieve Job /api/v1/tts/{jobId} API using the returned id.<br /><br />Use callbackUrls get a callback when a TTS job completed.

post/api/v1/tts

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

callbackUrlsstring[]

Callback urls for any async job. Max size of callback urls is 4. <br /><br />The callback will be sent only once. It will be a POST request with the same data format as Async Retrieve Job /api/v1/tts/{jobId} API.<br /> Your endpoints should return 2xx status code and should not take more than 10 seconds to respond. Otherwise, the callback will be considered as failed.

Example request

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

Response

Job entity that can be later used to fetch the status of the TTS job.

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

callbackUrlsstring[] required

Callback urls for any async job. This can be empty array.

Example response

{
  "id": "643e383551e2730025c5ae69"
}