Python Text To Speech Tutorial - How to make an Audiobook with Python

Python Text To Speech Tutorial - How to make an Audiobook with Python

Tom Baranowicz

3 года назад

8,012 Просмотров

This python tutorial shows how to change the text to speech and save in mp3 format. In the first example, we will change the long article into the audio version and in the second one, I will show you how to extract text from a PDF book and change that book into an audiobook. Enjoy!

Source Code: https://github.com/tombaranowicz/PythonAudiobookGenerator

Follow me on:
LinkedIn: https://www.linkedin.com/in/tombaranowicz/
Twitter: https://twitter.com/tombaranowicz
Github: https://github.com/tombaranowicz
Instagram: https://www.instagram.com/tombaranowicz/

Тэги:

#python #TextToSpeech
Ссылки и html тэги не поддерживаются


Комментарии:

@kateu.8439
@kateu.8439 - 09.02.2023 13:07

Thank you for this, great video!!

Ответить
@laurentiucristiangavrila6516
@laurentiucristiangavrila6516 - 10.11.2021 16:59

How can i save the text into a word or xlsx?

Ответить
@dennisboscodemello2123
@dennisboscodemello2123 - 13.08.2021 15:35

Is there any way to pop up an option for choosing the page from which the reading will start & option for choosing the pdf file is there, I am pasting the code

import pyttsx3 as py
import PyPDF2 as pd

pdfReader = pd.PdfFileReader(open('Excel-eBook.pdf', 'rb'))
from tkinter.filedialog import *

speaker = py.init()

voices = speaker.getProperty('voices')

for voice in voices:
speaker.setProperty('voice', voice.id)

book = askopenfilename()
pdfreader = pd.PdfFileReader(book)
pages = pdfreader.numPages

for num in range(0, pages): # O is the number from where the reading will start
page = pdfreader.getPage(num)
text = page.extractText()
player = py.init()
player.say(text)
player.runAndWait()

Ответить
@anushkabaviskar1387
@anushkabaviskar1387 - 09.05.2021 08:35

I run in jupyter notebook it run successfully but i haven't found audio file

Ответить
@BABA20111
@BABA20111 - 24.03.2021 06:12

Plz try to zoom the code so it can easily see and understand. Many people are using smartphone so please... In
Thanks
from Chandigarh
India

Ответить
@omarsh82
@omarsh82 - 07.02.2021 15:06

You earned my sub and like and congrats on the little one.

Ответить
@p_p8143
@p_p8143 - 06.02.2021 02:59

How to extract only relavent text

Ответить
@EnglishRain
@EnglishRain - 20.10.2020 00:59

Dude your topics are awesome! Keep it up!!

Ответить