-
Notifications
You must be signed in to change notification settings - Fork 6
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
0 parents
commit 0e82b33
Showing
16 changed files
with
677 additions
and
0 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,146 @@ | ||
### pawelad ### | ||
.idea/ | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
|
||
### PyCharm ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/dictionaries | ||
.idea/vcs.xml | ||
.idea/jsLibraryMappings.xml | ||
|
||
# Sensitive or high-churn files: | ||
.idea/dataSources.ids | ||
.idea/dataSources.xml | ||
.idea/dataSources.local.xml | ||
.idea/sqlDataSources.xml | ||
.idea/dynamic.xml | ||
.idea/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/gradle.xml | ||
.idea/libraries | ||
|
||
# Mongo Explorer plugin: | ||
.idea/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
### PyCharm Patch ### | ||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 | ||
|
||
# *.iml | ||
# modules.xml |
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,13 @@ | ||
language: python | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
python: 3.4 | ||
env: TOXENV=py34 | ||
|
||
install: | ||
- pip install tox --use-mirrors | ||
|
||
script: | ||
- tox |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Pythonity | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,7 @@ | ||
include *.md | ||
include *.txt | ||
include LICENSE | ||
include tox.ini | ||
recursive-include ivona_speak *.mp3 | ||
recursive-include ivona_speak *.py | ||
recursive-include requirements *.txt |
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,123 @@ | ||
# Ivona, Speak! | ||
[![Build Status](https://img.shields.io/travis/Pythonity/ivona-speak.svg)][ivona speak github] | ||
[![PyPI Version](https://img.shields.io/pypi/v/ivona_speak.svg)][ivona speak pypi] | ||
[![Python Versions](https://img.shields.io/pypi/pyversions/ivona_speak.svg)][ivona speak pypi] | ||
[![License](https://img.shields.io/github/license/Pythonity/ivona-speak.svg)][license] | ||
|
||
Python (3) script that lets you easily convert passed text to | ||
synthesized audio files, with help of Amazon's [IVONA][ivona]. All you | ||
need is a pair of [keys][ivona keys] and this script. Yes, that's | ||
*literally* everything you need to never speak again. If that's your | ||
thing of course. | ||
|
||
If you want to use IVONA Speech Cloud directly inside your (probably | ||
awesome) Python project then have a look at | ||
[python-ivona-api][ivona api github], which this script also uses. | ||
|
||
## Installation | ||
With `pip` (recommended): | ||
```shell | ||
$ pip3 install ivona_speak | ||
``` | ||
|
||
Without `pip`: | ||
```shell | ||
$ git clone https://github.com/Pythonity/ivona-speak | ||
$ pip install -r ivona-speak/requirements.txt | ||
$ cd icon-font-to-png/bin | ||
``` | ||
|
||
## Usage | ||
The script comes with two subcommands (`synthesize` is the default one): | ||
```shell | ||
$ ivona-speak synthesize -h | ||
Usage: ivona-speak synthesize [OPTIONS] TEXT | ||
|
||
Synthesize passed text and save it as an audio file | ||
|
||
Options: | ||
--access-key TEXT IVONA Speech Cloud access key. | ||
--secret-key TEXT IVONA Speech Cloud secret key. | ||
-a, --auth-file FILENAME Path to YAML file with 'access-key' and 'secret- | ||
key' set. | ||
-o, --output-file PATH Output audio file path. [required] | ||
-n, --voice-name TEXT Voice name (default: Salli). | ||
-l, --voice-language TEXT Voice language (default: en-US). | ||
-c, --codec [ogg|mp3|mp4] Used codec (default: mp3). | ||
-h, --help Show this message and exit. | ||
``` | ||
|
||
```shell | ||
$ ivona-speak list-voices -h | ||
Usage: ivona-speak list-voices [OPTIONS] | ||
|
||
List available Ivona voices | ||
|
||
Options: | ||
--access-key TEXT IVONA Speech Cloud access key. | ||
--secret-key TEXT IVONA Speech Cloud secret key. | ||
-a, --auth-file FILENAME Path to YAML file with 'access-key' and 'secret- | ||
key' set. | ||
-l, --voice-language TEXT Filter voice by language. | ||
-h, --help Show this message and exit. | ||
``` | ||
|
||
## Examples | ||
With above usage everything should be pretty clear, but in case it | ||
isn't: | ||
|
||
You can provide keys either explicitly or put them in YAML file (one of | ||
those ways is required): | ||
`$ ivona-speak list-voices --access-key 'YOUR_ACTUAL_ACCESS_KEY' --secret-key 'YOUR_ACTUAL_SECRET_KEY'` | ||
`$ ivona-speak list-voices -a secrets.yaml` | ||
|
||
Also, `synthesized` is the default subcommand so those do the same: | ||
`$ ivona-speak synthesize -a secrets.yaml -o hello_world.mp3 'Hello world!'` | ||
`$ ivona-speak -a secrets.yaml -o hello_world.mp3 'Hello world!'` | ||
|
||
List all available IVONA voices, and list them now: | ||
`$ ivona-speak list-voices -a secrets.yaml` | ||
|
||
I want someone to say 'Hello world!', and say it quick: | ||
`$ ivona-speak synthesize -a secrets.yaml -o hello_world.mp3 'Hello world!'` | ||
|
||
She sounds so nice. I want someone special to respond her: | ||
`$ ivona-speak synthesize -a secrets.yaml -o response.mp3 -n Joey 'How you doin?'` | ||
|
||
### Example auth file | ||
```shell | ||
$ cat secrets.yaml | ||
access-key: YOUR_ACTUAL_ACCESS_KEY | ||
secret-key: YOUR_ACTUAL_SECRET_KEY | ||
``` | ||
|
||
## Tests | ||
Package was tested with `pytest` and `tox` on Python 3.4 | ||
(see `tox.ini`). | ||
|
||
To run tests yourself you need to set environment variables with secret | ||
and access keys before running `tox` inside the repository: | ||
```shell | ||
export IVONA_ACCESS_KEY="YOUR_ACTUAL_ACCESS_KEY" | ||
export IVONA_SECRET_KEY="YOUR_ACTUAL_SECRET_KEY" | ||
``` | ||
|
||
## Contributions | ||
Package source code is available at [GitHub][ivona speak github]. | ||
|
||
Feel free to use, ask, fork, star, report bugs, fix them, suggest | ||
enhancements and point out any mistakes. | ||
|
||
## Authors | ||
Developed and maintained by [Pythonity][pythonity]. | ||
|
||
Written by [Paweł Adamczak][pawelad]. | ||
|
||
[ivona speak github]: https://github.com/Pythonity/ivona-speak | ||
[ivona speak pypi]: https://pypi.python.org/pypi/ivona_peak | ||
[license]: https://github.com/Pythonity/ivona-speak/blob/master/LICENSE | ||
[ivona]: https://www.ivona.com/ | ||
[ivona keys]: http://developer.ivona.com/en/speechcloud/introduction.html#Credentials | ||
[ivona api github]: https://github.com/Pythonity/python-ivona-api | ||
[pythonity]: http://pythonity.com/ | ||
[pawelad]: https://github.com/pawelad |
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,16 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
|
||
try: | ||
# Installed system wide | ||
from ivona_speak.command_line import cli | ||
except ImportError: | ||
# Locally | ||
sys.path.append(os.path.join(os.path.dirname(__file__), '..')) | ||
from ivona_speak.command_line import cli | ||
|
||
|
||
if __name__ == '__main__': | ||
cli() |
Empty file.
Oops, something went wrong.