bacnguyenxgen

Text to speech

Mar 12th, 2022 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. import pyttsx3
  2. book=open(r"bao.txt")
  3. book_text=book.readlines()
  4. engine = pyttsx3.init()
  5.  
  6. for i in book_text:
  7.     engine.say(i)
  8.     engine.runAndWait()
Add Comment
Please, Sign In to add comment