Creating a AudioBook

 Installing pyttsx3:

          pip install pyttsx3

Installing espeak:

          sudo apt install espeak


import pyttsx3
book=open(r"#add_path_of_txt_file")
book_text=book.readlines()
engine = pyttsx3.init()
for i in book_text:
engine.say(i)
engine.runAndWait()

No comments: