Don't Buy Audiobooks! 😎 Build Your Own With Just 12 Lines Of Python
Вставка
- Опубліковано 5 лип 2020
- Convert any PDF to an Audiobook with just 12 lines of Python. You can try it as a beginner.
All you need is just two python libraries: pyttsx3 and PyPDF2
It's fun, it's easy. Try it.
Here is the full code: github.com/programminghero1/a...
WHAT IS THE VIDEO ABOUT?
• If you're a lazy reader, make your computer read for you
• If you're a crazy reader, make the process smarter
Now, if you're new to the programming world and don't know what to do, go check out our app and build your own game immediately while learning.
Android App: bit.ly/AndroidProgHero
iPhone Version: bit.ly/iOSProgHero
ENJOYED THE VIDEO?
Save yourself from our Grandma - she'll come to your house and eat all your cookies if you don't subscribe to this channel even after watching a video.
OUR SOCIAL MEDIA
Watch us on Facebook: bit.ly/FBProgHero
Peep us on Instagram: bit.ly/IGProgHero
Fly with us on Twitter: bit.ly/TWProgHero
Board with us on Pinterest: bit.ly/PTProgHero
SHARE this video with your friends so that they can become lazy, but smart person.
#pdf #audio #book #audiobook #python #smart #hack #smarthack #cool #trick
few weeks later:
"Don't watch my videos, make your own!
Lol
haha
😂
🤣 🤣 🤣 🤣 🤣
Op bhai
This video is sponsored by Audible.
lol
THAT was funny )))
It would be a great sponsor because the tts even paid one from google or amazon are terrible for audiobooks, they sound terrible, even the deeplearning ones and are more expensive word for word then audible. It just makes no sense (as of 2020). Will check on the idea in couple years, there are good chances it will change.
🤣🤣🤣🤣🤣
Audible reported this video as a threat to thier sales
Next up:
Don't use Python. Build your own programming language
Build your own, using 100 lines of python.
Don't watch any UA-cam tutorials.
Make your own 🥴
Next up:
Don't use programming language. Build your own machine code
@@subratahalder9538 *writes program 1 byte at a time using a series of switches*
@@ancapftw9113 he has finally done it
I love how you tell us what all these abbreviations are and mean, most people just show you what it looks like and how to run it. Thank you!
You're most welcome
now I don't have a single reason not to learn python
I’ll give you a reason. Video games 😂😂😂 lol jk - learn python 🐍
@@joeballer4036 I am not playing games. 😅
Sir,how to play hindi or other language voice? 🙄🙄
😂😂😂😂😂😅
Yooo
Great, short, and precise!! Love it when I'm able to achieve something in one video. Gives me the motivation to learn more. Good job!!
Glad it was helpful!, keep watching us and download our app, Programming Hero.
@@ProgrammingHero is this a company?
Dont code. Just copy text n paste on google translate.
wtf 🤣 never thought of it , that's kinda smart 🤣
But isn't google translate has certain texts limitation?
Ya right copy 111 pages of text also take care that images dont get copied right?
@@paragggoyal1552 who told u to copy entire at once r u going to listen it in one go
Hi there! Join our discord channel and ask your questions there. Our cool programmers and peer learners will help you out!
I just have got an ebook of nanotech and it is a whopping 319 pages. But now, the book is going to read itself. I feel very motivated by these tutorials. Thanks a lot and I hope you will be the best coder with the best coding channel of all time.
This is such a cool idea! Thanks for sharing. Sometimes it's hard to find the motivation or drive to want to code, but seeing wacky ideas like this makes me want to.
'If you're poor like me...'
Also him: *has an Apple computer
...that's... why he's poor.
well you poor after buying one
Many people who own a Mac don't spend much money on computers, this Mac is from 2009, and so is the computer in my bedroom, in the living room and in the Mac in mail-room is even from 1999. Still working so why would I replace it? Most of my computers have costed me only a few hundred a year if the new price is spread over a decade or so. Mac owners do not alway have truckloads of money, all computers in my house have to share only one laser printer. I even had to save money on wires! Nowhere in my house you will find that fancy new stuff like the one that looks like a garbage bin, not even to think about the newest newest.
@@vanhetgoor yes overpriced computer.could use linux if want ls command xD.windows and linux can run mac on emulator even now they run faster than original.thats funny xD
@@jarisipilainen3875 Wait do linux really run windows/mac emulator faster than directly windows?
Btw which linux distribution would you recommend?
Man great .
Your chanel is tremendous ,I am just following ya from Mozambique
Excellent video!! Much useful that all I've "learned" in the university. I definitely subscribe
Me: *loves reading*
Also me: *watches this anyway*
Thank you! ❤
I want to read and listen at the same time for better compression
Smae here bro
This is so useful. I will definitely use this a lot. I’m still new to this and have been using the spyder IDE but now can see the benefit of using pycharm! Thanks for this tutorial 👍🏻
You're very welcome!
But pycharm is not available for 32bit system 😔
That's pretty cool, you make it look so easy! This is pretty fun for a layman to try out. Little effort and high reward
Glad you like it!
Amazing! You make these projects really easy to understand.
Glad you think so! 😊
After you wrote the loop, you forgot to change the number 7 to the variable ”num.” If you run the code with this mistake, it will read page number 7, 103 times 😂
Please can tou fix it for me😁😁😁😁
@@beastnighttv Just write num instead of 7
@@superhesk ok
@@beastnighttv page = pdfReader.getPage(num)
@@gabrielrmattoso done
I like that you make practical projects mixed with some humour instead of dry theories about python programming. Thanks very much.
Glad you like them!
I’m glad I found you 😊 I was trying to figure it out and you teach so well.
Awesome! Thank you so much for uploading this. This helped me look further into the other packages in Python. You've just earned yourself a subscriber!😉
We can directly use Microsoft Edge browser it also provide play text in audio.
and now you know how to made your own.
@Hrishikesh Malviy Opening a pdf in browser is no different than opening it in adobe acrobat. . .
@Hrishikesh Malviy You still have to open a program to view the pdf... Doesn't matter if it's a browser or not.
BOT voice without feeling
CHEK HERE, github.com/ashraf-minhaj/Audio-Book/
You can't fall in love with it
@@ProgrammingHero whats this?
@@anto1756 He gave it a female voice on the github version
@@ProgrammingHero why female voice is spanish?
Awesome video man thanks , i just subscribed , i was wondering is it possible to sync it with a narrating software to get rid of the robotic reading or should i try and make my own ?
Just today i saw your channel and i am loving it 👍thank you for the amazing tutorials.
Glad to hear that! ❤
The PyReader: Look mama I can talk
He: I know you can talk but now sh:t up
This made me laugh so hard
me too.
Your app was awesome When was app development course was available in programming hero?????
It is already in the app more update of that course will come
Nice video! Learning unknown things makes curiosity to learn more. Your tutorial made it. Hoping to watch embedded python tutorial in your easy way.
noted!!
That's a really cool thing to do. Good video, it really shows how simple and powerful code can be. Thanks!
I saw you app a while ago, but didn't have a chance to try it. I'll give it a go!
All the best dear!
Hahaha...wow....I don't know if I need a audiobook but I definitely found this so useful and I know nothing about coding and now I know something about coding that I can use if I want . Great stuff 👍
And I subscribed coz your grandma is cool 😎
You're so welcome! ❤
I wasn't searching for this, but... I like you
I like you man, keep up the good vibes!
Thanks, you too!
Thanks for a very considering guidance! I truly appreciate your job!
Do you have any recommendation for most close human voice TTS (Opensource) ?
🙏🏻
Best youtuber i ever came across. I just love your content. You are unique and love your crazy projects.
Glad to hear that!
I wouldn't do that for fiction books though; Even within audio book, one has to be careful to know who is reading it:
some readers are very good at adding another dimension by injecting proper emotions.
So true
This is just fun Tutorial, text to speech programs are already available (maybe even in chrome)
@@anujrathore2517 And they do as much of a bad job because they don't offer that "extra dimension".
that's why neural networks are so important. with proper usage of nlp, test data for emotions and a voice sample you can code\train your own 'reader'
while debugging the code i got
pydev debugger: process is connecting
this error and then program automatically finish without any python voice
anyone knows the exact solution
join here for more discussioon about your problems with our other users.
discord.gg/smDj2fk
Glad to have found your channel!
Is this something that can only be done on 💻 and 🖥 or can it be done using iPad?
AttributeError: 'int' object has no attribute 'extractText' i am facing this issue and the pdf which i upload to audiobook i get question mark on it
Nice Intro Bro and Nice tutorial we can extend this forward also
Thanks and sure
12:15 after writing for loop you just forgot to change 7 to num in line number 9 . 😊😊
Left a bug so that you have to hire me as a consultant to fix this bug :D
@@ProgrammingHero 😂😂
@Shamima Yeasmin because we Indians don't like to pay.. 😂😂
@@ProgrammingHero sor please fix it
@@beastnighttv dude just Wright getPage(num) instead of getPage(7)
I LOVE your energy! Subscribed.
Thank you for this amazing code.
once 'for loop' is altered.
How do I control speaker's voice speed ? can I add another voice?
Thanks for teaching me how to make computers say "Mother I crave violence" on infinite loop
Whatever you do, don't make an AI say that!
Possibly the darkest way to toture a computer. Are we not ALL computers?
wait.. did i just type that?
I cracked when he said, "if you're very poor, u can google and download a pdf..." 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣
xD
or cheap.
no way I buy anything over Internet again xd too much effort to sort out between scammers and true sellers
we Russians always do so, because most of us are very poor. that's kind of sad =(
@@qn565 it's ok, many people around the world are poor. To laugh at someone's poverty is the biggest poverty. Don't be sad. Better days will come. Let's keep downloading pdfs till then :) I'm not poor but I've seen some hard days. I wish nobody is poor in this world, ever. The one who wants nothing is the richest and the one isn't content is the poorest. btw I'm Indian. Richness is what we need, not riches.
If you're going to pirate the pdf then you might as well just pirate the audiobook. No robot talking and the quality's better.
You are really brilian and kindness for always share all codes you have to us to learn more and more about Python. Thank you so👍
Nice video, I can learn more about modules by this channel. Nice one 👍
Few years from now:
"Don't live on Earth, make one with 420 lines of code!"
hahaha! Nice idea!
@@ProgrammingHero You are not gonna do it right...right guys?
@@eggcat287 confused in tenet.....
Here comes the programming hero
Continue automation projects
Thanks!
More to come. Stay tuned.
Great video! Thanks!
One last thing though, how can download the audio that the program reads and save it on my phone to listen to it on my way to work ?
Amazing. Short and accurate explanation. Thank you
Glad it was helpful!
I just did this project but occured error that osError but i just open the pdf file but showing error invalid argument .. can u please tell me the solution 🙏🙏
you can join this server and discuss you problems , discord.gg/vsk8HW
If you are on Linux, install espeak
Everybody gangsta until the bot doesn't stop speaking after pausing
You are awesome bro
Thousand of like from my side if it is possible. Keep going on
Such an amazing session. Thanks for that. 👍👍👍
wow thats awesome, make use of code daily life makes it intresting.... its my first video in this channel and subscribed it.
Thank you so much! ❤
I Love How I Got Amazon Audible Ad While Watching This Lmao
Please guide how can we embed (fix) audio file in pdf with code or without code
I, a complete beginner, learned more about Python (and coding in general) from watching this 13 mins video than from other hours-long tutorials, this is great!
And also, to anybody else here being the "coding expert" and typing in the comments stuff like "Yeah, or you can just do this and that instead of writing it yourself", well, yes you can, but this guy is basically showing people how to do small coding projects to improve their programming skills and knowledge about the method to do so, which is crucial for someone who is just starting (like me).
I'm definitely going to watch a ton more of these videos, glad I discovered this channel!
sameeeeeeeeeeeeee
although i do like watching mosh
Hi! I'm Pronab Mondal, I have one quaries. Before that I want to inform you that presently I'm using Python 3.9 64bit Ver. and PyCharm community Edition 2020.2.3 which is now latest. As following your video I was doing step by step but i'm not able to count the pdf pages.
"pages = pdfReader.numPages" I stuck here. numPages is not showing in my Pycham. Please help me
"Use another pdf file and see if it still has the same error. If it does, switch back to previous version of python. Not every modules are updated with python latest versions.
This project comes under which domain
Am also stuck at this point but I am using Python version 3.8
Hello guys, just put the first “P” of pdfReader in capital letter, it should be PdfReader, and the job is done ✅
Its our privilege to have developer like you thanks boss
& one more thing please roll out update
Thank you so much. Stay tuned we are coming with more automated videos.
How to connect this Python project with my speaker so that I can carry the speaker to listen anywhere without carrying my PC or Laptop to that place. Please help me.
Hi there! Join our discord channel and ask your questions there. Our cool programmers and peer learners will help you out!
Great video. But it's also to be noted that the document structure might not support parsing and so it might not ALWAYS be feasible to use this to extract text from it. Just a heads up for people :)
So any alternative
A solution would always be welcomed when pointing out a problem.
Very informative video thanks for it
My pleasure
This is amazing . A few questions
1. Does python also skips Diagrams on the page.
2. Also I saw , the program started reading from header. Any way you can skip header and footer of the page.
3. If the PDF is in 2 column format, does it detects it intelligently ?
4. What if there is a table in between . how does this table gets read , row wise or columnwise.
"Yes it does skip diagrams and images, how do you read images btw? If there are any printable texts, it will read those for you."
Try it out yourself bro to get the answers. Not everything can be spoonfed
@@Goku-tt5hb True!
Wow You are just awesome ... The way you teach line by line that is superb.. Thanks God Bless you Sir !❤️
So nice of you
That was very nice. I have a question though, is it possible to pause the speaker and play the speaker from the stopped position?
I learning python and i am a begineer and this is good example for me
well keep it up.
this is a life changing tutorial. i would like to thank you for this incredible discovery.
Hello sir please reply i am in confusion ...i am using kali linux and pycharm as ide and the talking speed of my program is so fast how can i reduce it
Hi, this is awesome.
What changes should I make to this script if I want to open a selection window and select a PDF file instead of using the name (of the PDF file) in the script, each time I run the python code?
Thank you
Hiii, did you found any answer for the Same???
was there a bookmark called "Mafia" at 1:22 ??!!
Ya
yes, we are mafia xD.
Wow, perfect for me, one question, Any idea how control the speed?
Yes! Use import time at the top of your code, then After it says speaker run and wait on line 13 indented write time.sleep(.1)
@@maxhoden0303 we can do like that, but for more flexibility, we should use the keyboard module to detect a key press which will be set up to dynamically add/subtract values of a variable, then we use that variable in the time sleep function, then we can control the time sleep function resulting in more flexibility
If u need, I can write u the base code
@Gaurav Lohare sure, I will write and explain to u when I will get back to my pc
@Gaurav Lohare 👍👍
hi, i am having trouble with the first part. Where you said to click on the terminal when I do this it does not look like yours. the biggest difference is that it does not have Venv highlighted rather it just say C:\Users\Acer\PycharmProjects\pdf reader> then here where I type. I tried to write the execution to download the package anyway but it does not recognize pip.
I'm definitely interested in learning more.
Liked and subscribed
10:43 I just got happy to much I don't why but got very happy ❤️❤️❤️❤️❤️
Glad that you are happy
I liked your vedio but still I would love to meet your grandma 😆
Sure, my grand ma will love to meet with you.
For pycharm professional 2021.1.3 version.. what would be the install package.. because at my side it's showing ( could not find a version that satisfies the requirement pyttsx3).( no matching distribution found for pyttsx3)
Oh so you're the guy who mad eprogramming hero ahah let's go bro you're great didn't even know you had a channel
You didn't finish the changes for the "FOR" statement
specificly you need to change 7 to num, without this you have the same page read out over 100 times.
You have to type num in getPage(num)
Thanks for your tip
You explain very much clearly sir
8:34 “I know you can talk so shut up!” That makes me laugh 😂
Or you can install Microsoft edge open pdf and click read out loud....
Definitely. Though with this approach, one can extend it to read other sources of text. In general, coding it gives you greater control (e.g. playback speed or storing the speech into a file and uploading it to my phone).
It would be surprising to make a program from scratch that can do the
same job without using modules.
Amazing explanation. I will try it, but with some more advanced TTS option like the ones of Google, IBM, or Azure. Thank you very much!
Hello! I was trying to stop speaker using speaker.stop()
I am doing it in Tkinter.
When Speaker start speaking then everything(that UI) stop working
It seems that your grandma will do more than eat all cookies - is she going to target practice with the cookie jars?
In any case I felt an urge to like this video.
I love a video that delivers exactly what it promised
yes, it was amazing. ur explanation is so good. kindly give more innovative videos.
Man you are really amazing. Why don't u make tutorial videos for DS and ML.
Your voice is so wholesome
Thanks for your appreciation
The way he said "if you are very poor just go to google" that motivated me to be a poor 😂
The Blue Yeti's mic is front facing (the side with the blue logo) if you sent the audio to the heart shape. So that means the yeti is normally vertical rather than horizontal.
Hi, thanks for video.
1. How do you save this as an MP3?
2. Suppose there is some useless text you wish the program does not extract and read (e.g. the page number, chapter title, etc. at the bottom/top of a page). How do you make sure this isn't read?
3. Can you adjust length of pauses in the speech, to signal start of chapter, heading, etc.?
4. Are there other more 'natural' speech packages I can use? E.g. Google's TTS?
Your grandmother will come to my house and ready all my cookies? Who is she, Santa? ;)
Your grandma says this will read page 8 over and over again.
change the number 7 to num after the "for loop" line:
for num in range(7, pages):
page = pdfREader.getPage(num)
@@nkhalid thankyou bhayajiiii
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported. this error shows for me!!!what can i do
TY Mr. Actually Helps me!
Developer : Doing everyday job
3 Lakh Viewers : Interesting
After watching one min of this video I clicked like because your grandma appears on screen with Gun 😂
Hahahaha!! very funny , thanks for watching.
@@ProgrammingHero ai abal dekhle amr hasi pai
@@sheikhshagor6040 keno?
@@sheikhshagor6040 haan bodo abal, bhablam kichu voice set diye sentiment modulation korbe, eto Stephen Hawkings kore diyechhe.
@@ProgrammingHero How can I saved that audio so I don't need to run the script again and again?
Sir when I store my pdf file under pythonproject folder. The I open pycham editor , this is shown question mark. As a result when i run program, error show that pdf file not found
Love this. You make it look so easy.
Thank you! Cheers!