---
title: "Sync TTS"
method: POST
path: "/api/v1/tts/sync"
tags: ["Text-to-Speech"]
---

# Sync TTS

`POST /api/v1/tts/sync`

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](async-tts).

## Request body

- TextToSpeechSyncRequest
  - `text` string, required — Text to be converted to audio
  - `speaker` string, required — Speaker ID. You can retrieve speaker ID with [Retrieve Speakers](retrieve-speakers) `/api/v1/speakers` API.
  - `speakerStyle` string — 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.
  - `speed` number — Speed of the audio to be generated

## Response `201`

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](async-tts). Check the job status with [Async Retrieve Job](async-retrieve-job) API using the returned id.

- TextToSpeechSyncResponse
  - `id` string, 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
  - `progress` number, required
  - `team` string, required
  - `workspace` string
  - `project` string
  - `error` JobErrorResponse
    - `code` string, required
    - `message` string, required
  - `createdAt` string, date-time, required — TTS requested time.
  - `estimatedTimeAt` string, date-time — Job estimated timestamp in milliseconds
  - `estimatedTimeMs` number — Job estimated time in milliseconds
  - `data` TextToSpeechOutput[], required
    - `status` 'pending' | 'succeeded' | 'failed', required — Status of the TTS request
    - `text` string, required
    - `speaker` string, mongoid, required
    - `speakerStyle` string, mongoid, required
    - `speed` number, required
    - `pause` Pause[], required
      - `position` number, required
      - `value` number, required
    - `emphasis` Emphasis[], required
      - `position` number, required
      - `value` 0.25 | 0.5 | 0.75, required
    - `urls` string[] — Audio URLs of the TTS request
    - `pronunciations` Pronunciation[], required — Pronunciations applied to the TTS request
      - `sourceWord` string, required
      - `targetWord` string, required
      - `isReplaced` boolean, required
    - `error` JobErrorResponse
      - `code` string, required
      - `message` string, required

## Other responses

- `400` — API key expired
- `401` — API key invalid
- `402` — No active subscription
- `422` — API key not found

---

[API](https://skmtc.net/lovo/apis/genny-api.md) · [All operations](https://skmtc.net/lovo/apis/genny-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lovo/genny-api/versions/5b03ec09cf3e/schema)
