LLM Audiobook Prompts
I do most of my reading while commuting in Taipei, and the course textbook has no commercial audiobook. So I sat down with an AI assistant and built one. The whole method is below — every prompt, the script, and the reasoning — because the useful part isn't my audio files, it's that you can do this with any book you own, in about an hour.
The method, in eight steps
Buy the textbook
Non-negotiable, and it's step one for a reason. Everything below assumes the book is yours.
Obtain a PDF version
Many publishers sell a PDF or ePub directly. If you bought physical, check whether your purchase includes digital access, or whether your library licenses an accessible copy.
Point the assistant at the file, and ask the real question
Don't ask “make me an audiobook.” Ask it to evaluate the options first. That one framing change is what produced an honest answer instead of a confident wrong one.
Let it discover its own limits
My assistant tried to install a cloud text-to-speech tool and found its sandbox had no network access to speech services. That failure was the most useful step in the project — it moved the work onto my Mac, which is where it belonged anyway.
Reject the tempting wrong tool
NotebookLM was my first instinct because it's free and makes great audio. But it produces a conversation about your document — two hosts chatting, paraphrasing. For studying a textbook I needed the actual sentences, in order. Faithfulness beat production value, so we used the plain
sayengine built into macOS.Extract chapters to clean text
The assistant read the PDF, found each chapter's real boundaries, stripped page numbers and running headers, and wrote one
Chapter_01.txtper chapter into a folder. Chapter 1 came out at 8,368 words — about 56 minutes of audio.Narrate with one double-click
A tiny shell script walks the folder and converts every chapter to an
.m4a. No terminal commands, no account, no API key. Free and offline.Pick a voice you can stand for 12 hours
The default (Samantha) put me to sleep in four minutes. Swapping to Zoe (Premium) made it listenable. Download voices at System Settings → Accessibility → Spoken Content → System Voice → Manage Voices, then change one line in the script.
The prompt — copy this
Paste this into any AI assistant that can read files and run code on your machine. Fill in the two bracketed bits.
I own a copy of [BOOK TITLE + AUTHOR] and I have it as a PDF at [FILE PATH]. There is no commercial audiobook and I want to listen to it while I commute. It is for my own study use only; I will not distribute the audio. Before you build anything, evaluate the options and tell me the trade-offs: 1. Can you generate speech yourself, or is your environment network-restricted? Test it and tell me what actually failed rather than assuming. 2. Compare: (a) NotebookLM-style tools, (b) a paid cloud TTS API like ElevenLabs or OpenAI, (c) the free offline text-to-speech engine built into my operating system. I care most about FAITHFULNESS -- I want the book's actual sentences read verbatim, not summarized or turned into a discussion between hosts. 3. Tell me whether the length of the book creates any token or context limits, and why. Then, once I have picked an approach: - Extract each chapter from the PDF into its own clean .txt file. Find the real chapter boundaries, and strip page numbers, running headers, and footnote noise so the narration does not read junk aloud. - Write me ONE double-clickable script that converts every chapter file into an audio file in the same folder. I do not want to type terminal commands. Include a clearly commented line at the top where I can change the voice and the reading speed. - Do chapter 1 first as a sample so I can check the quality before you process the whole book. Tell me the word count and estimated audio length for the sample chapter.
The script
This is the entire thing. Save it as Narrate_Textbook.command next to your
Chapter_*.txt files, then run chmod +x Narrate_Textbook.command once
(or ask your assistant to). Double-click it. First run, macOS may warn about an unidentified
developer — right-click → Open.
#!/bin/bash
# Double-click this file to narrate each Chapter_*.txt into an .m4a audio file.
# Free, offline, uses the macOS built-in `say` voice. No account needed.
cd "$(dirname "$0")"
VOICE="Zoe (Premium)" # Change me. Download voices: System Settings > Accessibility >
# Spoken Content > System Voice > Manage Voices.
# If say errors on the name, run: say -v '?' to list installed voices.
RATE=175 # words per minute; lower = slower
shopt -s nullglob
echo "Starting narration with voice: $VOICE"
for f in Chapter_*.txt; do
base="${f%.txt}"
echo "Narrating $f -> $base.m4a (a few minutes per chapter)"
say -v "$VOICE" -r "$RATE" -f "$f" -o "$base.m4a" --file-format=m4af --data-format=aac \
|| say -r "$RATE" -f "$f" -o "$base.aiff"
done
echo ""
echo "Done. The .m4a files are in this folder. You can close this window."Why local
A 400-page book would blow past any model's context window if you fed it through the model. This method never does. The chapter text is extracted to a file on disk, and your computer's speech engine reads that file directly. The words never pass through the language model at all, so book length is irrelevant. Cloud TTS APIs do have per-request character caps — which is exactly why the local approach handles long books better than a paid one.
The actual conversation
Here is the real exchange, lightly edited.
it's done. when you have finished downloading everything please do a couple of things:
1) consider a way to automate creating audio-podcasts of each of the readings. perhaps notebookLM is an option? its free and I can sign in. you can possible drive with the browser. otherwise, consider other ways to do it with an API. I'd be willing to get an account with elevenlabs or another text to audio service.
Now your audio request. Let me test whether I can do faithful text-to-speech right here in the sandbox for free, before recommending a workflow.
Ran a commandRan a commandedge-tts is blocked — the sandbox can't reach Microsoft's speech servers. Let me probe what network and offline options are available, since that determines the whole workflow.
Ran a commandRan a commandFeasibility: The faithful-narration part is very doable, but not from inside my sandbox
— its network is locked down to package installs only. It can't reach any TTS service
(Microsoft, ElevenLabs, OpenAI all blocked) and has no offline voice engine. So the actual audio
synthesis has to run on your Mac. The good news: your Mac already has a high-quality, offline,
free TTS engine built in — the macOS say command — and it reads text
verbatim, which is exactly the “extremely faithful” narration you want (unlike
NotebookLM, which paraphrases into a chat-show and would not be faithful).
The workflow I'd set up: I extract each textbook chapter's text from the PDF and clean out page-number/footer noise, saving one .txt per chapter. I write a single double-clickable script into that folder. You double-click it once; macOS narrates every chapter to an .m4a right next to the text. No typing, no Terminal commands, no account.
Token limits — your specific question: No. The chapter text is extracted on disk and synthesized on your Mac; it never passes through the language model, so there's no context/token limit on length. The only “limits” that exist for TTS are per-request character caps on cloud APIs — irrelevant here. This is why the local approach is actually better for a 400-page book than any API.
Quality trade-off — one decision for you: macOS say (free, offline,
faithful) vs. a paid cloud voice (ElevenLabs/OpenAI) that sounds more natural but costs money and
would need your API key in a local script.
Audio sample is ready to test. In the Textbook_Audio/ folder there's
Chapter_01.txt (faithful, cleaned Chapter 1 text — 8,368 words, ~56 min) and
Narrate_Textbook.command. Double-click the .command file; macOS will narrate every
Chapter_*.txt in that folder into matching .m4a files using the free built-in voice.
If macOS warns about an unidentified developer, right-click it → Open the first time. Once
you like the result, I'll extract all 12 chapters and you re-run it for the whole book.
samantha's voice is going to put me to sleep for the voice textbook. I'm going to take a look at the other voices and lyk which voice I like so we can voice generate the rest of the assigned readings and textbook chapters 1–4.
Voice is now Zoe (Premium) in the script, and I extracted Chapters 1–4. To regenerate in
Zoe: first download the voice (System Settings → Accessibility → Spoken Content →
System Voice → Manage Voices → English US → Zoe (Premium)), delete the old
Chapter_01.m4a, then double-click the script — it'll narrate all four chapters.
Once you confirm Zoe sounds right, I'll extract the rest of the textbook and the assigned-reading
PDFs the same way.
Transcript lightly trimmed for length and to remove an unrelated request about coursework. Tool-call details are collapsed to Ran a command markers.
Friend, M. (2021). Interactions: Collaboration skills for school
professionals (9th ed.). Pearson. Narrated with the macOS say engine
(voice: Zoe Premium) for personal study use; audio not distributed.