Skip to main content

This package creates audiobooks from PDF files

Project description

PDF to Audio Converter

Convert PDF documents to spoken audio files using Google's Text-to-Speech service through the gTTS library and PyPDF2 for reading PDFs. This tool is ideal for creating audiobooks or for enhancing accessibility.

Features

  • Convert PDFs to audio: Turn any PDF document into an audio file.
  • Multi-language support: Uses Google's Text-to-Speech which supports various languages.

Installation

Install from PyPI with pip:

pip install pdfToAudio

Requiriments

pip install gTTS pypdf PdfReader

Quick Start

Here is how you can use the pdf_to_audio function to convert a PDF document into an audio file:

from pdfToAudio.pdf_to_audio import pdf_to_audio

pdf_path = 'path/to/your/pdf_file.pdf'

output_audio_path = 'path/to/your/audio_file.mp3'
language = 'en'  

pdf_to_audio(pdf_path, output_audio_path, language)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfToAudio-1.0.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

pdfToAudio-1.0.2-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file pdfToAudio-1.0.2.tar.gz.

File metadata

  • Download URL: pdfToAudio-1.0.2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for pdfToAudio-1.0.2.tar.gz
Algorithm Hash digest
SHA256 bd472da3c4c8640c60fdea4ebce8783bfe260d8fcce94beea7ec9da9bf03713e
MD5 4fe092692b8264d71694dd1ef51a3f4a
BLAKE2b-256 d3ba553a7b7cc68e3d683842d1268197a6642c421d1cabf395093a2bb1c2df7b

See more details on using hashes here.

File details

Details for the file pdfToAudio-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pdfToAudio-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for pdfToAudio-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a9c731f264be6d0f30c9db0e667c356baf336594d8edb34de19c71bef9bbf56
MD5 b37566002721a90a4e801c775368f27c
BLAKE2b-256 72ad865b19e7fd2d4e681177f07a3017638f362c957d93ad6deab60279cab60d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page