项目作者: harshitsaini

项目描述 :
Library to transfer image document to text and speech document.
高级语言: Python
项目地址: git://github.com/harshitsaini/Document-to-Text-and-Speech.git


Advanced-Optical-Character-Recognizer

(Document-to-Text-and-Speech)

Make a shallow clone of the repository in system’s local environment.

git clone https://github.com/harshitsaini/Document-to-Text-and-Speech.git —depth 1

Install the packaged repository in system’s local/virtual environment using setup.py present in the root directory of the cloned repository. This command installs a library named doc2speech.

python3 setup.py install

Python code below is an example of how the doc2speech library works.

  1. import doc2speech
  2. # Driver function
  3. if __name__ == '__main__':
  4. # Path of the folder where document image is present
  5. doc_path = "/path/to/documentImage/"
  6. # Name of the document image to be converted
  7. docName = 'doc.png'
  8. # Path of the folder where output has to be generated
  9. output_path = "/path/to/output/"
  10. doc2speech.performConversion(doc_path = doc_path,
  11. docName = docName,
  12. output_path = output_path)