Skip to main content

Build Status PyPI Version Python Versions License

Python (3) script that lets you easily convert passed text to synthesized audio files, with help of Amazon’s IVONA. All you need is a pair of 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, which this script also uses.

Installation

With pip (recommended):

$ pip3 install ivona_speak

Without pip:

$ 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):

$ 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.
$ 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

$ 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:

export IVONA_ACCESS_KEY="YOUR_ACTUAL_ACCESS_KEY"
export IVONA_SECRET_KEY="YOUR_ACTUAL_SECRET_KEY"

Contributions

Package source code is available at 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.

Written by Paweł Adamczak.

Release files for ivona_speak 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ivona_speak 0.1.0
File Size Uploaded
ivona_speak-0.1.0.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ivona_speak 0.1.0
File Interpreter ABI Platform
ivona_speak-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / ivona_speak-0.1.0.tar.gz

Download URL ivona_speak-0.1.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8f5a06430edf9363db5b3aaaeda67e57eb7d4701e4f1e58ce3283240d527f7ea
BLAKE2b-256 checksum
How to use checksums
2394ae585524ef7772f3e9de8f67231b35a02d139543330e3eef4f77e6681669
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ivona_speak-0.1.0-py3-none-any.whl

Download URL ivona_speak-0.1.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f64a7ba6137dcae677b96476ac37b9818f943a2a8775c25757062fa7b0f17215
BLAKE2b-256 checksum
How to use checksums
7fface198a5fb665123e01fa58213658d05248cf0649fd63a956a2d12dd16987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page