项目作者: sudonitin

项目描述 :
Convert your ebooks to audiobooks. 📖->🎧
高级语言: Python
项目地址: git://github.com/sudonitin/Audio-book-generator.git
创建时间: 2018-09-09T15:39:16Z
项目社区:https://github.com/sudonitin/Audio-book-generator

开源协议:

下载


Implementing speech synthesis(📖 to 🗣) on eBooks

Bored of writing notes in a lecture? How about we convert the notes dictated by the lecturer into text?
Use the speechtotext.py script to get the text format of spoken notes, which saves the text in a .txt file.


Too lazy to read a novel? Get an Ebook version of the novel and run the finalAudioBookGenerator.py script. It will generate an mp3(audio) format of the book. Enjoy book listening :)


You can also convert your single images using singleImageReader.py script



An example of each of the script is shown, the text from spoken text.PNG was delivered by me, observe the s2txt.txt it is the output (accurate to a great extent if you have a decent english speaking accent)

Listen to the read.mp3 and observe the page numbers which are spoken from the pdf file. (eg of ebook reader)

Prerequisite

For Windows Users

  • Install tesseract from here.
  • Add tesseract to your environment variable. (Add this path C:\Program Files (x86)\Tesseract-OCR)
  • Type ‘tesseract’ in cmd you will get a lot of options like this.
  • (Optional: This step should be done only if you get an error which gives the below error )Add a new variable in environment variable TESSDATA_PREFIX and give it C:\Program Files (x86)\Tesseract-OCR\tessdata this value.
  1. Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.

For Linux Users

How to run:

NOTE: You need to complete the steps mentioned in Prerequisite.

Run these commands in cmd/terminal of a directory

  1. git clone https://github.com/globefire/Audio-book-generator.git
  2. cd speech-recognition-Ebook-Reader
  3. pip install -r requirements.txt
  4. python speechtotext.py
  5. python finalAudioBookGenerator.py

Watch the demonstration

Support Me

If you liked this Repository, then please leave a star on this repository. It motivates me to contribute more in such Open Source projects in the future.

Happy Coding =)