Skip to main content

Python Prosody API: Emotion & Prosody sensitive TTS

Project description


Python Prosody API: Emotion & Prosody sensitive TTS

How To Use


Install prosody using pip

python -m pip install prosody

Creating a Client

From prosody_api package import Client class, then create a Client object with your valid username and password.

from prosody.prosody_api import Client

cli = Client('your_id', 'your_password')

Creating a Voice Item

In order to create a Voice item, which is needed for API server to generate actual WAV file, import Voice class from voice_item package and create an instance of Voice class. There are five public attributes in Voice class, two of them are necessary, and the rest is optional.

Required Attributes

  1. text: The text user wants to convert to a WAV file.
  2. actor: User can choose the actor of generated voice.

Optional Attributes

  1. emotion
  2. prosody
  3. signature: Users cannot set an arbitrary signature on their own. After registering the Voice, the server will automatically give a signature.
from prosody.prosody_api import Client
from prosody.voice_item import Voice

# Creating a new client and a new Voice object.
cli = Client('your_id', 'your_password')
new_voice = Voice('안녕하세요', 'lady1')
registered_voice = cli.register_voice(new_voice)

# Updating the Voice object.
registered_voice.text = '반갑습니다'

# Removing the Voice object.

Generating WAV File

Then, you can call generate_voice to create actual WAV file.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prosody, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size prosody-0.0.5-py3-none-any.whl (6.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size prosody-0.0.5.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page