Content Studio

Narration

Turn a PDF or DOCX into a narrated audiobook, optionally translated first.

document.narrate reads a PDF or DOCX aloud with a natural voice and returns one merged audio file, word timestamps and a subtitle file per page. Set targetLanguage to translate the text before it is narrated.

OperationInputCreditsResult files
document.narratePDF or DOCX, up to 50 MB80 credits per narrated pageaudio, timestamps, srt_page_N

Input

uploadIdstringrequired

Upload of a PDF or DOCX document.

sourceLanguagestringoptionaldefault: English

Language the document is written in.

targetLanguagestringoptional

Narrate in this language instead. The text is translated before narration.

voicestringoptionaldefault: Enceladus

A Gemini voice name such as Enceladus, Kore, Aoede, Charon, Fenrir or Puck. Unknown voices are rejected.

tonestringoptionaldefault: professional

Narration style.

Allowed values:
professionaleasy_to_understandcasual
accentPromptstringoptional

Up to 500 characters describing the accent or delivery.

outputFormatstringoptionaldefault: mp3

Format of the merged audiobook.

Allowed values:
mp3wav

Code Example

curl -X POST https://api.transpera.io/v1/jobs \
  -H "authorization: Bearer tp_test_..." \
  -H "content-type: application/json" \
  -H "idempotency-key: $(uuidgen)" \
  -d '{
    "operation": "document.narrate",
    "input": {"uploadId": "UPLOAD_ID", "targetLanguage": "Hindi", "voice": "Kore", "outputFormat": "mp3"}
  }'

Result

Result of a finished document.narrate job
{
  "job": {
    "id": "JOB_ID",
    "operation": "document.narrate",
    "status": "succeeded",
    "chargedCredits": 240,
    "result": {
      "type": "files",
      "text": null,
      "files": [
        {
          "role": "audio",
          "fileName": "full_audiobook.mp3",
          "url": "https://...",
          "expiresAt": "..."
        },
        {
          "role": "timestamps",
          "fileName": "full_audiobook.json",
          "url": "https://...",
          "expiresAt": "..."
        },
        {
          "role": "srt_page_1",
          "fileName": "page_1.srt",
          "url": "https://...",
          "expiresAt": "..."
        }
      ]
    }
  }
}