-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: Build and upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/*.whl |
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
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
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 not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ build: | |
upload: | ||
pip3 install twine | ||
python3 -m twine upload dist/*.whl | ||
deploy: | ||
make clean | ||
make build | ||
make upload |
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