read any audio book using 12 lines of python
To read PDF file using Python
pip install pypdf2
To Read text (Text to speech)
pip install pyaudio
pip install pyttsx3
This code can read all the printable text from a PDF file/ Book
read any audio book using 12 lines of python
To read PDF file using Python
pip install pypdf2
To Read text (Text to speech)
pip install pyaudio
pip install pyttsx3
This code can read all the printable text from a PDF file/ Book
item 1 in argtypes passes a union by value, which is unsupported.
Code_line: speaker = pyttsx3.init()
Error: OSError: libespeak.so.1: cannot open shared object file: No such file or directory
OS: Ubuntu 20.10
Because of this hardcoded value of 7, "for num in range(7, pages):", this code will fail to read document less than 7 pages or skip first 7 pages of larger document. It was meant to skip content section, so it would have been to make it command line argument for user to choose from.
Hi,
Thank you for this code,
but I am stuck when I want to run print(pages), it shows the following in my terminal:
Traceback (most recent call last):
File "P:\Python Projects\AudioBook\main.py", line 3, in
book = open("RichDadVsPoorDad.pdf")
FileNotFoundError: [Errno 2] No such file or directory: 'RichDadVsPoorDad.pdf'
PS: I am using Atom as IDE
TypeError: item 1 in argtypes passes a union by value, which is unsupported.
sir it only read the http links and chapter number and page number only...
The PyAudio pip is broken at the moment
Are there any other pips to replace it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.