Build a PDF to Audio Mp3 Converter Web App in Node.js and Express Using GTTS Library Full Tutorial For Beginners

You are currently viewing Build a PDF to Audio Mp3 Converter Web App in Node.js and Express Using GTTS Library Full Tutorial For Beginners

 

 

 

Welcome folks in this blog post we will be building a web app in which we will be converting pdf documents to audio mp3 using node.js and express. And for this we will be using the library called as gtts for converting text to audio.

 

Live Demo

 

You can see the live demo of app here

 

 

Get Started

 

 

In order to get started you need to install the following dependencies

 

npm i express

 

npm i multer

 

npm i ejs

 

npm i gtts

 

npm i pdf-text-extract

 

npm i nodemon

 

After installing all the dependencies make a index.js file and copy paste the following code

 

 

 

 

 

Now make a views folder inside the root directory and inside it make a pdftoaudio.ejs file and copy paste the following code

 

 

views/pdftoaudio.ejs

 

 

 

 

 

Screenshot

 

 

 

 

 

Leave a Reply