Short version: every major text-to-speech API takes a text string. None of them read a PDF.
So converting a document to audio means building an extraction step first. That step is where the audio quality gets decided.
This covers why PDF to audio sounds bad when you build it the obvious way. What breaks in the extraction. And how to convert a PDF to MP3 in one call instead of two.
01The Problem Nobody Mentions
You want your app to read a document aloud. An accessibility feature. Training material. A report someone listens to in the car.
So you look at TTS APIs. ElevenLabs, OpenAI, Google Cloud, Azure, Amazon Polly, Cartesia.
They are all excellent. They all want the same input: a string of text.
None of them open a PDF. None of them open a Word document.
That is not a gap in their products. It is a scoping decision. They do speech synthesis, not document parsing.
Which leaves you building the missing half.
02The Two-Step Pipeline
The obvious architecture:
document -> extract text -> send text to TTS -> audioStep two is a solved problem with a dozen good vendors. Step one is where projects go wrong, because extracting text from a PDF is deceptively hard and the failures are invisible until you listen.
03Why Step One Is the Hard Part
A PDF is a description of where marks go on a page. It is not a document with a reading order.
Pull the text out and you find how little structure was there.
This is the same problem in a different costume. We wrote about it for spreadsheets in The Hard Part of PDF-to-Excel Isn't the Text, It's the Table. A table on screen and a table in data are not the same object, and a PDF knows about neither.
Six things break. All of them look fine on screen and sound terrible in audio.
Multi-column layouts. Academic papers, reports and newsletters use columns.
Naive extraction reads across the page instead of down the column. You get the first line of column one, then the first line of column two.
On screen it looks scrambled. Read aloud it is unlistenable.
Headers and footers. Every page has them. Extraction includes them. Your listener hears the company name, the document title, and "Page 4 of 27" between every single page.
Tables. A table read linearly is a stream of numbers with no relationships.
"Revenue 2024 2025 Q1 4.2 5.1 Q2 3.8 6.0" tells a listener nothing. If your documents are table-heavy, extract the tables properly before you narrate anything.
Hyphenation. Words broken across line breaks come out as two fragments. Some engines pronounce them separately, so "interna- tional" becomes two sounds that are not a word.
Footnote markers. Superscript reference numbers extract as ordinary digits inline with the sentence. Your listener hears numbers appearing at random in the middle of paragraphs.
Ligatures and encoding. Character pairs like fi and fl are single glyphs in many PDFs. Extraction that does not normalise them produces missing letters or replacement characters, which the speech engine either skips or pronounces.
None of these show up in testing. The test file is clean.
They show up when a user uploads a real document.
Here is the part that matters. All six are extraction failures, not speech failures.
Pair the best TTS engine in the world with poor extraction and you get audio nobody will listen to.
Voice quality is what people shop for. Extraction quality decides whether the output is usable.
04The One-Call Version
The Text to Speech API takes the document directly. Extraction and synthesis in one request.
Send a file upload, a document URL, or plain text. Convert PDF to MP3 in a single call.
No extraction step to build. No intermediate text to store. No second vendor.
Six endpoints. That sounds like a lot. It is a three-by-two grid.
| Input | Returns MP3 directly | Returns a signed link |
|---|---|---|
| Uploaded file | /file/file | /file/link |
| Document URL | /url/file | /url/link |
| Plain text | /text/file | /text/link |
Pick your input on the left, pick how you want the output on the right.
A document URL to a signed link, which is the most common production shape:
bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-text-to-speech/url/link" \
-H "apy-token: $APY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/report.pdf",
"gender": "female"
}'Returns:
json
{
"data": "https://..."
}Or plain text straight to a downloadable MP3:
bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-text-to-speech/text/file" \
-H "apy-token: $APY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"Hello world, this is a sample.","gender":"female"}'Two required parameters. gender accepts male or female. Text input handles up to 75,000 characters, and file uploads up to 100MB, with the URL endpoints available for anything larger.
05Binary or Signed Link: Which to Use
Not an arbitrary choice, and getting it wrong is the most common integration mistake.
Use the binary endpoints when the audio goes straight to the user and you do not keep it.
A read-aloud button that streams once. Simplest flow, nothing to store.
Use the signed link endpoints when the audio is a file someone comes back to.
A library of narrated documents. An email with a listen link. Anything played more than once. You store a URL instead of an MP3, which is much lighter than holding audio yourself.
Links are also right for long documents. Your request finishes when the link is issued, instead of holding a connection open through a large transfer.
06Where This Actually Gets Used
Accessibility. The most common reason. Often a compliance requirement rather than a nice-to-have. A read-aloud option on any document your product shows.
Internal training and onboarding. Policy documents nobody reads become something people listen to on a commute.
Report distribution. Attach audio alongside the PDF. One call, and considerably more people consume it.
Content repurposing. Long-form articles become a podcast feed with no recording session. Convert PDF to audio in bulk and a back catalogue becomes a listening library. Pair it with document conversion if your source files are not already PDFs.
Multitasking users. Anyone reading a lot of documents while doing something else. Field engineers, drivers, medical staff between appointments.
07Being Straight About the Trade-Off
This is a document-to-audio API, not a voice studio. That distinction matters when you are choosing.
Use a dedicated TTS provider when the voice is the product. ElevenLabs, Cartesia, Azure, and Google offer hundreds or thousands of voices, voice cloning, emotion control, SSML for fine pronunciation control, and sub-100ms latency for real-time voice agents. If you are building a character voice, an audiobook you intend to sell, or a conversational agent, use one of those and build the extraction yourself.
Use this when the document is the product and the audio is a feature of it. You want a report read aloud clearly, in one call, on the same key as the rest of your pipeline. Two voice options is enough for an accessibility feature and nowhere near enough for a narration business.
Knowing which one you are building saves a lot of time.
08Chaining It
Document-to-audio is rarely the whole job. The common shapes:
Summarise, then narrate. A long report becomes a short summary. The summary becomes a two-minute audio brief.
AI Summarize then Text to Speech. Cheaper than narrating fifty pages, and more people will listen.
Extract, translate, narrate. A document in one language becomes audio in another. Translation sits in the middle.
Scan, OCR, narrate. A photographed or scanned document has no text layer at all. OCR comes first.
We covered exactly where OCR falls over in OCR in Python, including a test where Tesseract dropped the decimal point in four of seven monetary values on a clean invoice.
Convert, then narrate. Source files are rarely all PDFs. File conversion normalises them first.
Each of these is a chain. Chains have their own failure modes: latency stacks, partial failure is normal, and order matters. API Chaining in 2026 covers sequencing and what to cache.
09What It Costs
Each call is 750 atoms, whichever endpoint you use.
Atoms are ApyHub's unit of work. A call is priced by what it does rather than counted as one request, which is why a heavy conversion and a lightweight lookup do not cost the same. We explained the model in Dynamic pricing.
The free plan allows 5 calls a day with no credit card. Enough to run your worst three documents through and hear whether the extraction holds up. If you are comparing options, what free tiers actually give you covers the market.
Try the Text to Speech API | Get a free API key
10Further Reading
- The Hard Part of PDF-to-Excel Isn't the Text, It's the Table - the same structural problem, for spreadsheets
- OCR in Python - what to do when the document has no text layer at all
- API Chaining in 2026 - sequencing summarise, translate and narrate without it breaking
- Dynamic pricing - how atoms work and why calls are not all priced the same
- API Fundamentals - if requests, responses and API keys are new to you
11Conclusion
PDF to speech looks like a text-to-speech problem. It is an extraction problem in a text-to-speech costume.
The synthesis half has a dozen excellent vendors.
The extraction half is where columns scramble, headers repeat every page, and tables become unrelated numbers. That half decides whether anyone listens.
If the voice is your product, pick a voice specialist and build the extraction yourself.
If the document is your product, skip the pipeline and send the document.
Browse the audio processing catalog
12FAQ
How do I convert a PDF to speech?
Either extract the text and send it to a text-to-speech API, or use an endpoint that accepts the document directly. The first is two steps and you own the extraction quality. The second is one call. ApyHub's Text to Speech API accepts an uploaded file, a document URL, or plain text and returns an MP3.
Can ElevenLabs or OpenAI read a PDF?
No. Both take a text string as input, as do Google Cloud TTS, Azure, Amazon Polly, and Cartesia. Converting a document with any of them means extracting the text yourself first, then sending the result.
Why does my PDF to audio output sound wrong?
Almost always extraction, not synthesis. Multi-column layouts get read across instead of down. Headers and footers get read on every page. Tables become streams of unrelated numbers. Hyphenated words split into fragments. Footnote markers become numbers in the middle of sentences. All of these look fine on screen and are obvious in audio.
What is the best API to convert documents to audio?
If the voice quality is your product, use a dedicated TTS provider and build the extraction. If the document is your product and you want one call, an endpoint that accepts files and URLs directly is simpler and avoids maintaining a parsing step.
Can I convert a PDF to MP3 with an API?
Yes. Send the file, or its URL, to an endpoint that accepts documents directly and choose a voice. You get back either the MP3 as binary data or a signed link to it. No separate extraction step, and no intermediate text file to store.
Can I convert a Word document to MP3?
Yes. The file and URL endpoints accept document content rather than only PDFs, so Word documents and text files work the same way. Send the file or its URL and choose a voice.
Should I get the MP3 back directly or as a link?
Take the binary response when the audio plays once and you do not need to keep it, such as a read-aloud button. Take the signed link when the audio is a file someone returns to, or when the document is long, since the request completes as soon as the link is issued rather than holding a connection open for a large transfer.
How long can a document be?
Text input accepts up to 75,000 characters. File uploads accept up to 100MB per request. For anything larger than that, use the URL-based endpoints so the document is fetched rather than uploaded.
What voices are available?
Male and female. That is enough for an accessibility feature or document narration, and it is not a substitute for a provider offering hundreds of voices with cloning and emotion control. Choose based on whether the voice or the document is the thing you are building.
Is text to speech useful for accessibility compliance?
It is commonly part of the answer. Offering an audio alternative to written content supports users with visual impairments, dyslexia, and reading difficulties. Whether it satisfies a specific standard depends on which standard applies to you, so check the requirement rather than assuming an audio option covers it.
How do I summarise a document and then narrate it?
Chain two calls. Send the document to a summarisation endpoint, take the returned summary, and pass that text to the speech endpoint. This produces a short audio brief from a long report, and it is cheaper than narrating the full document.
13About ApyHub
ApyHub is a curated API catalog for developers, teams, and AI agents. The audio processing category covers text to speech, speech to text, transcription, and audio extraction, alongside file conversion, AI and OCR, data extraction, and more across 20 categories.
One subscription covers the whole catalog, billed in atoms, with headroom pooled across every API rather than locked to individual services. Every service carries machine-readable certification covering data handling, retention, and standards alignment including GDPR, SOC 2, and ISO 27001. Every endpoint is MCP-ready by default.
ApyHub is headquartered in Amsterdam, with offices in the Netherlands, Greece, and India, and runs on EU infrastructure. The catalog holds 450+ services and 1,500+ endpoints, with new APIs and providers onboarded continuously. The free tier allows 5 calls a day with no credit card, and every service page has a playground for testing before you build.
