Selected work

Case study 07

Audio books. A title in, a script and one MP3 out.

A production line that turns a book title and an author into a structured Arabic script and a single audio file. Writing, recording, and joining clips used to be separate stages.

Sector
Arabic audio publishing
Type
Pipeline from title to script and MP3
Role
Product owner and implementing engineer: content shape, processing chain, both models, voice settings, and one delivery run

The business problem

  • A script of about 1,500 to 2,000 words needed a fixed shape, and that shape did not repeat.
  • Sending a whole book to the voice engine stopped at the length limit and cut the narration.
  • Joining clips by hand left chapter order open to mistakes.
  • Nothing tied the writing, the saved script, and the final audio file.

What the line changes

The run was carried out on Atomic Habits by James Clear. No passage from the book is quoted. Elapsed time is not listed, because it was not measured.

One cycle

Enter the title and the author. The system delivers the script and one MP3.

The same shape

An opening, 8 to 10 themes, ten practical rules, and a closing question.

Clean speech

Formatting marks are removed before the voice speaks.

Short clips, one file

Passages fit the voice engine, then they are joined.

One voice

The same voice, with fixed stability and similarity, runs for the whole book.

System workflow

Keys are not shown.

  1. 01Title and author
  2. 02GPT-4o writes the script
  3. 03Save {title}.txt
  4. 04Clean and split, with a paragraph fallback
  5. 05ElevenLabs speaks each clip
  6. 06Join into {title}_Audiobook.mp3

Technical architecture

RuntimePython
WritingOpenAI GPT-4o
VoiceElevenLabs, model eleven_multilingual_v2
TextRegex cleanup, then a split on separators
DeliveryMP3 clips joined into one file