Skip to content

TanUkkii007/pdf2speech

Repository files navigation

pdf2speech

Don't miss learning opportunities. Life is too short.

pdf2speech converts PDF to mp3 audio with text-to-speech engine. It allows you to read PDF books while you are walking.

Status

Currently I am testing to convert O'reilly books to audio. scripts in example directory successfully converted some O'reilly books. I guess formats of the animal books of O'reilly are generally same so it generally works for the other books as well.

Requirements

pdf2speech currently supports AWS Polly only as text-to-speech engine. Be sure to set up AWS credentials correctly.

pdf2speech uses Node.js and ES2016 syntax. Install Node.js with proper version.

How to run examples

clone pdf2speech.

git clone git@github.com:TanUkkii007/pdf2speech.git
  1. install dependencies
npm install
  1. Run example with a PDF file path argument.
node example.js path/to/pdf

This command generates several mp3 files. To concatenate these files, run cat command.

cat out-*.mp3 > combined.mp3

ToDo

  • I think pdf2speech cannot be a general CLI tool. There are tons of different formats of PDFs so programming is needed. Instead of providing general CLI, examples for specific books can be helpful.
  • publish pdf-to-audio conversion process streams as library
  • API refinement
  • CMAP support

About

convert PDF to mp3 audio with text-to-speech engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published