AudioBuk

PDF to Audio converter

Description

A program that when run will request to select a pdf file and will convert it to an audio file which is spoken out loud

Installation

Simply run the audio.py file

License

Open source

Source Code: audio.py

import PyPDF2
import pyttsx3
from tkinter.filedialog import *

book = askopenfilename()
pdfReader = PyPDF2.PdfFileReader(book)

pages = pdfReader.numPages

for num in range(0, pages):
    page = pdfReader.getPage(num)
    text = page.extractText()
    speak = pyttsx3.init()
    speak.say(text)
    speak.runAndWait()