DEV Community

Cover image for Convert your Pdf in cool AudioBook with 3 lines of python code
Deepak Raj
Deepak Raj

Posted on • Edited on • Originally published at codeperfectplus.herokuapp.com

13 8

Convert your Pdf in cool AudioBook with 3 lines of python code

AudioBook 🔊

download

The AudioBook is a python module to Listen to your favourite pdf 📖. It also can be used offline.

Documentation

Check the Audiobook Documentation here

Installation

Install it from pypi

pip install audiobook
Enter fullscreen mode Exit fullscreen mode
from audiobook import AudioBook
ab = AudioBook("file_path")
ab.text_to_speech()
Enter fullscreen mode Exit fullscreen mode

Linux installation requirements

  • If you are on a Linux system and if the voice output is not working, then: Install espeak , ffmpeg and libespeak1 as shown below:
sudo apt update && sudo apt install espeak ffmpeg libespeak1
Enter fullscreen mode Exit fullscreen mode

Roadmap

  • speech speed control
  • Support more extensions
  • save the audiobook for future

Links

GitHubPypiDocumentation

Contributions are welcome. Share your feedback in comments.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay