Skip to content

Commit

Permalink
reverted to commit version 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nateshmbhat committed Mar 14, 2020
1 parent 3b993e4 commit 3c0054b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
.DS_Store

# C extensions
*.so
Expand Down Expand Up @@ -103,4 +104,4 @@ docs/make.bat
docs/make.bat

# vscode
.vscode/
.vscode/
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.
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.83',
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 3c0054b

Please sign in to comment.