Created
February 27, 2018 12:26
-
-
Save 4rshdeep/859a86927f652daaf78814e4aa7f856a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#https://pyttsx3.readthedocs.io/en/latest/engine.html#examples | |
import pyttsx3 | |
engine = pyttsx3.init() | |
engine.setProperty('voice', 'punjabi') | |
rate = engine.getProperty('rate') | |
print(rate) | |
engine.setProperty('rate', rate-100) | |
engine.say('ਸੋ ਦਰੁ ਤੇਰਾ ਕੇਹਾ ਸੋ ਘਰੁ ਕੇਹਾ ਜਿਤੁ ਬਹਿ, ਸਰਬ ਸਮਾਲੇ ॥ ਵਾਜੇ ਤੇਰੇ ਨਾਦ ਅਨੇਕ, ਅਸੰਖਾ ਕੇਤੇ ਤੇਰੇ ਵਾਵਣਹਾਰੇ ॥ ਕੇਤੇ ਤੇਰੇ, ਰਾਗ ਪਰੀ ਸਿਉ ਕਹੀਅਹਿ ਕੇਤੇ ਤੇਰੇ ਗਾਵਣਹਾਰੇ ') | |
engine.runAndWait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment