Text to speech recording for e-learning: one file per slide

Record e-learning narration with text to speech: one audio file per slide, the same voice each time, MP3 or WAV, and redo only the slide that changed.

5 min readSume
All posts

To record e-learning narration with text to speech, generate one audio file per slide or section from its script, always with the same voice, in a format your course authoring tool imports, such as MP3 or WAV. When a line changes, you regenerate that one slide's file instead of re-recording the module. With Sume, each slide is one TTS 1.0 job, POST /v1/tts-1.0/generate, with a fixed voice, the audio format your tool imports, and its own Idempotency-Key.

Sume facts come from the TTS 1.0 request schema in the Sume API reference, the OpenAPI document behind the API reference docs, and from the Jobs and results docs, read on 2026-09-27. The rate is read from the code behind API pricing. Text to speech API walks through every request field.

How do I keep one voice across the whole course?

Each TTS request speaks with one voice, so a course sounds consistent when every slide sends the same one. Pick it once and store it with your course settings:

  • voice.id: a TTS voice UUID or a Voices library id (voi_ plus 32 hex characters). In the Sume app today, library voices are the ones cloned or designed under Assets → Voices; see AI voiceover with your own voice.
  • avatar_id or avatar_handle: the voice of one of your avatars, usable once its voice.status is ready.
  • language: set it on every slide of a non-English course. Omitted, it defaults to English.
  • generation_config.speed: a multiplier from 0.6 to 1.5. Use one value for the whole course.

Which file format should each slide use?

Use the format your authoring tool imports. A request without output_format already returns an MP3 file; ask for WAV when you want uncompressed audio to edit first. Text to speech API lists every sample rate and encoding. The table shows three choices, and the request after it makes one slide's MP3.

From the TTS 1.0 request schema in the Sume API reference, read 2026-09-27.
You wantSend in `output_format`You get
MP3, the defaultNothingMP3 at 44,100 Hz and 128 kbps
A different MP3 bit rate"container": "mp3", a sample_rate, and a bit_rate, which is required for MP3 when you override the defaultsMP3 at 32, 64, 96, 128, or 192 kbps
WAV"container": "wav", an encoding such as pcm_s16le, and a sample_rateWAV audio; pcm_s16le is 16-bit PCM
curl -X POST https://api.sume.com/v1/tts-1.0/generate \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: course-101-m2-slide-07-v1" \
  -d '{
    "transcript": "A balance sheet lists what a company owns and owes on one date.",
    "voice": { "id": "YOUR_VOICE_ID" },
    "language": "en",
    "output_format": { "container": "mp3", "sample_rate": 44100, "bit_rate": 128000 },
    "generation_config": { "speed": 0.95 }
  }'

How do I redo one slide when the script changes?

Give every slide its own job and its own key, such as course-101-m2-slide-07-v1, and name the file after the slide:

  • Retry with the same key. If a submit times out, resend the same body under the same Idempotency-Key; the retry returns the original job instead of billing a second one.
  • Change the key when the text changes. A key is for one operation and payload, and reusing it with a different body answers 409 idempotency_conflict. Bump the suffix to -v2 and submit only that slide.
  • The job runs in the background. Poll its status_url until terminal is true, then read the audio from result_url; the Python version shows the loop.

How long can one slide's narration be?

  • transcript takes up to 20,000 characters, and spaces and punctuation count toward usage.
  • Synthesized audio longer than 1,200 seconds fails with tts_duration_exceeded, and no credits are captured.
  • With timestamps: { "words": true }, the result carries word timings, and in the current code also the file's duration_seconds: a way to check slide timing or to highlight words as they are spoken.

How much does text to speech narration cost?

TTS 1.0 costs $0.0475 per 1,000 characters, plus a 5.5% agent fee by default, counted on every transcript character, spaces and punctuation included. At that rate, a 40-slide module with 600 characters per slide (24,000 characters) comes to $1.14 before the fee.

Redoing one slide bills only that slide's characters, and a retry under the same key is not billed twice. For a presenter on camera rather than a voice over slides, see AI avatars for online course videos.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume