Code Monkey home page Code Monkey logo

text-to-speech-ocr's Introduction

Text To Speech OCR

This is a multithreaded text to speech program that takes a large input file and exports an mp3.

It can work with both pdfs and txt files. The beauty of this is that it can work with a pdf file that is made up of scanned in images of a book. It will turn them into an image and then turn that into text. There might be a better way to do this, but I cannot find it.

I am working to make it work more quickly by having it read files sooner. Right now it takes the entire file and turns it into an an mp3 and exports it. This takes far too long for most people to go along with it so I have to break it down so that while it is running and processing the rest it is already reading.

Installing the dependencies for the code

pip3 install pytesseract opencv-python gtts pydub pypdf2 pdf2image

If you are using linux than use your package manager to install ffmpeg. For Ubuntu and all other Debian based distros the command is

sudo apt-get install ffmpeg

If you are running windows download ffmpeg from this link and install it manually. https://ffmpeg.org/

Running the code

To run the program navigate to the directory you just downloaded and run

python3 main.py /path/to/file

text-to-speech-ocr's People

Contributors

cmortuus avatar

Watchers

 avatar

Forkers

tarsbase

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.