Skip to content

Python scripts that I created to turn any pdf or epub into an audiobook

Notifications You must be signed in to change notification settings

dordazrodriguez/Text_To_Speech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-To-Speech with Python

This repository contains Python scripts to convert any PDF or EPUB file into an audiobook.

Using gTTS (Google Text-to-Speech):

To use the gTTS (Google Text-to-Speech) script, you'll need to install the required packages:

pip install gtts PyPDF2 EbookLib SoundFile

Then, you can run the script with the following command:

python ./Scripts/simple_script_gtts.py "path/to/input.pdf" "path/to/output_folder" --verbose

Using Parler-TTS:

The Parler-TTS model from Hugging Face requires text input along with a description prompt to adjust the voice settings.

Check out the Hugging Face Demo to customize your voice.

You can run the Parler-TTS script as follows:

python ./Scripts/simple_script_parler-tts.py "path/to/input.pdf" "path/to/output_folder" --description="A female speaker that delivers her words clearly and easy to understand. High quality." --verbose

Feel free to explore and experiment with these scripts to create personalized audiobooks!

Releases

No releases published

Packages

No packages published

Languages