Convert PDF to Text and then to Audio Python

preview_player
Показать описание
import PyPDF2
from gtts import gTTS

pdfReader = PyPDF2.PdfFileReader(pdfFileObj)

mytext = ""

print(mytext)

tts = gTTS(text=mytext, lang='en')
Рекомендации по теме
Комментарии
Автор

A great way of and simple...that why I like your channel.

TwoWheelsSouls
Автор

That video really helped me in my python beginner project. Thanks

stalinengoma
Автор

How to Get the text in same format(like text position, Style) of PDF

teja
Автор

unable to get fill audio file until 3 min 29 sec!! how to get full audio conversation
?

arya
Автор

Can you tell me how to choose a dynamic text file ... plss

santhiya
Автор

thanks for the video! how could I use this for a file that contains Arabic? I've tried adding an encoding parameter to line 5, but it doesn't like that. Right now it converts the English perfectly, but it gives gibberish for the Arabic.

bikingscape
Автор

I really appreciate. Is it possible to read a dialogue with 2 difference voices?
In the text, 2 persons are making a conversation. How can we assign 2 different voices to them?

zephird.t.
Автор

How to know that the download is done ?

omarmohammed
Автор

I am getting superfluous white page error

kunalk
Автор

I tried it in jupyter notebook, but there it didn't work..

Mrayush_srivastava
Автор

Guys this pypdf2 module doent work on every pdf remember that .
Instead use slate3k module

tellg
Автор

Soumil will gtts works on Windows 10. Nice video.

raghudatheshgp
Автор

HOW TO RESOLVE THIS PROBLEM
"C:\Users\User\Desktop\PY "C:/Users/User/Desktop/PY PROJECTS/test file 1.py"

Traceback (most recent call last):
File "C:/Users/User/Desktop/PY PROJECTS/test file 1.py", line 17, in <module>
tts = gTTS(text=mytext, lang='en')
File "C:\Users\User\Desktop\PY PROJECTS\venv\lib\site-packages\gtts\tts.py", line 120, in __init__
assert text, 'No text to speak'
AssertionError: No text to speak

Process finished with exit code 1

tirthnisar
Автор

Thanks for the video.

The print function prints binary characters to me, how I can modify this problem. I tried other reading mode but it does not work.

thanks

befarad
Автор

how to get the audio output in the windows?

namanjain
welcome to shbcf.ru