Created
December 20, 2019 02:31
-
-
Save cdnsteve/0fb57d7ba47a316fc606006efd4a79f8 to your computer and use it in GitHub Desktop.
Python boots and cats text to audio - works offline!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
engine = pyttsx3.init() | |
rate = engine.getProperty('rate') | |
first_saying = 'And now for: boots and cats' | |
repeat_saying = 'and boots and cats ' | |
engine.say(first_saying) | |
engine.setProperty('rate', 360) | |
n = 5 | |
repeat_clean = '' | |
while n > 0: | |
n -= 1 | |
repeat_clean = repeat_clean + repeat_saying | |
engine.say(repeat_clean) | |
engine.runAndWait() | |
engine.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment