I want to parse a PDF file from my C# app and create an audio file off it. How would I do that ?
I'm particularly looking for a good pdf to text library or a way to strip a pdf file off its text.
Go to https://www.zamzar.com/convert/pdf-to-mp3/, and click "Choose Files" to upload your PDF document. Here, you can flexibly import PDFs from your local computer, Dropbox, Box, Google Drive, and OneDrive. Step 2. Select the "mp3" as the output format.
To convert a PDF to an audiobook you need to install some Python packages; pyttsx3, PyPDF2 & pdfplumber. All these packages can be easily installed by using the pip command; pip install <package name>. Also, Read – Machine Learning Full Course for free.
You preferably have a tagged PDF document as your input document. This means that the document contains tags to mark up the logical structure of the document (typically a PDF document will only contain visual information).
This PDF could then be converted into DAISY format, which is a standard for digital talking books, i.e. an intermediate XML format storing the text of books along with the logical structure and navigation features.
This Daisy XML format can be either converted to an audio format, or you could be using a Daisy reader, a physical device like an MP3 player to listen to the book.
There is a presentation available at the Daisy web site explaining the principles of this toolchain:
Accessible PDF to DAISY/NIMAS Conversion
Use Festival for the text to speech. Various pdf to text api's exist...
You need the Speech SDK from Microsoft. Read an instruction here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With