项目介绍

shayanalibhatti/Designing-a-PDF-Audiobook-using-Python 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,目前获得 54 个 Star、24 次 Fork。

仓库全名
shayanalibhatti/Designing-a-PDF-Audiobook-using-Python
Star 数
54
Fork 数
24
未关闭 Issue
1

README 摘要

Designing a PDF Audiobook using Python In this code, a simple implementation of PDF Audiobook is shown. PDF text is read to the user as audio using this code. Introduction Reading stories or essays or any text can be arduous, however an audio reading of the text is convenient and doesnt require as much concentration as reading requires. In this project, I implemented a simple PDF to audio converter. This code scans…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Designing-a-PDF-Audiobook-using-Python 用什么语言开发?

主要使用 Python 编写,目前有 54 个 Star。

如何获取 Designing-a-PDF-Audiobook-using-Python 的源码?

可以直接克隆仓库:git clone https://github.com/shayanalibhatti/Designing-a-PDF-Audiobook-using-Python.git,默认分支为 master;安装与运行步骤见仓库 README。

Designing-a-PDF-Audiobook-using-Python 最近还在维护吗?

仓库最近一次更新为 2021年3月31日,当前有 1 个未关闭 Issue;Star 数为 54,可作为社区活跃度的参考。

关于

In this code, a simple implementation of PDF to audio converter is shown

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
103
价值分
39
活跃状态
活跃

语言占比

Python

README

Designing a PDF Audiobook using Python

In this code, a simple implementation of PDF Audiobook is shown. PDF text is read to the user as audio using this code.

Introduction

Reading stories or essays or any text can be arduous, however an audio reading of the text is convenient and doesnt require as much concentration as reading requires. In this project, I implemented a simple PDF to audio converter. This code scans page(s) of PDF and reads it using audio, to the user. While this project is good for simple text reading, it does not perform good if a scientific paper with equations is given to it because equations are not supported to be read in pytesseract OCR library which we used to convert image to text.

Project Flow

Here is the project flow diagram:

project flow

  1. First, we take the PDF file and convert each page into image using PyMuPDF software.
  2. Then, we take the image(s) and scan the text in the image using Pytesseract OCR software.
  3. Then, we use Google Text to Speech (gTTS) library to convert text to audio file.
  4. Lastly, we get the Pygame mixer to play the audio file loud.
Prerequisite software

The software libraries required to run this code can be installed using:

pip install -r requirements.txt

Conclusion

It was seen that the code performs really well in reading straightforward PDF text files, however, if equations are involved in the text, then the reader cannot properly read the equations. Hence, the code is good for simple text but not for scientific papers as it will fumble reading the equations. However, text will be read just fine.

Please give a star to the repo to let me know if the work helped you.

评论

暂无评论