Skip to content

Commit

Permalink
updated pyttsx3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
nateshmbhat committed Feb 1, 2020
1 parent 7f87def commit de090d4
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ docs/make.bat
docs/make.bat

# vscode
.vscode/
.vscode/.DS_Store
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/usr/bin/python3"
}
23 changes: 23 additions & 0 deletions example/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import pyttsx3
engine = pyttsx3.init() # object creation

""" RATE"""
rate = engine.getProperty('rate') # getting details of current speaking rate
print (rate) #printing current voice rate
engine.setProperty('rate', 125) # setting up new voice rate


"""VOLUME"""
volume = engine.getProperty('volume') #getting to know current volume level (min=0 and max=1)
print (volume) #printing current volume level
engine.setProperty('volume',1.0) # setting up volume level between 0 and 1

"""VOICE"""
voices = engine.getProperty('voices') #getting details of current voice
#engine.setProperty('voice', voices[0].id) #changing index, changes voices. o for male
engine.setProperty('voice', voices[1].id) #changing index, changes voices. 1 for female

engine.say("Hello World!")
engine.say('My current speaking rate is ' + str(rate))
engine.runAndWait()
engine.stop()
Binary file added example/voicefile.mp3
Binary file not shown.
11 changes: 8 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ clean:
rm -rf dist/
rm -rf build/
build:
pip3 install wheel
pip3 install wheel --user
python3 setup.py bdist_wheel
upload:
pip3 install twine
python3 -m twine upload dist/*.whl
pip3 install twine --user
python3 -m twine upload dist/*.whl --verbose

deploy:
make clean
make build
make upload
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
setup(
name='pyttsx3',
packages=['pyttsx3', 'pyttsx3.drivers'],
version='2.8',
version='2.81',
description='Text to Speech (TTS) library for Python 2 and 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.',
long_description=long_description,
summary='Offline Text to Speech library with multi-engine support',
Expand Down

0 comments on commit de090d4

Please sign in to comment.