py-marytts
A pretty simple HTTP based interface to MaryTTS intended to make using this excellent TTS for waveform and IPA generation as convenient as possible.
Target audience are developers who would like to use MaryTTS as-is for speech synthesis in their Python application on GNU/Linux operating systems.
Constructive comments, patches and pull-requests are very welcome.
Examples
First, imports:
import wave import StringIO from marytts import MaryTTS
english (default) synthesis:
marytts = MaryTTS() wavs = marytts.synth_wav(‘Hello World!’) wav = wave.open(StringIO.StringIO(wavs)) print wav.getnchannels(), wav.getframerate(), wav.getnframes()
result:
1 16000 21520
try a different language:
marytts.locale = ‘de’ marytts.voice = ‘bits3’ wavs = marytts.synth_wav(‘Hallo Welt!’) wav = wave.open(StringIO.StringIO(wavs)) print wav.getnchannels(), wav.getframerate(), wav.getnframes()
result:
1 16000 16760
### List Available Voices
l = marytts.voices
result:
>>> l[0] ['upmc-pierre-hsmm', 'fr', 'male', 'hmm'] >>> l[1] ['dfki-pavoque-neutral-hsmm', 'de', 'male', 'hmm'] >>> l[2] ['cmu-slt-hsmm', 'en_US', 'female', 'hmm'] >>> l[3] ['cmu-rms-hsmm', 'en_US', 'male', 'hmm'] ...
### Grapheme to Phoneme (G2P) Conversion
marytts.locale = ‘en_US’ marytts.voice = ‘cmu-rms-hsmm’ cs = marytts.g2p (‘Hello World!’)
result:
>>> cs "h @ - ' l @U ' w r= l d"
### Synthesize Phonemes
wavs = marytts.synth_wav(“h @ - ‘ l @U ‘ w r= l d”, fmt=’xs’) wav = wave.open(StringIO.StringIO(wavs)) print wav.getnchannels(), wav.getframerate(), wav.getnframes()
result:
1 16000 21520
Links
<https://github.com/marytts/marytts> [MaryTTS on github]
Requirements
Python 2.7
MaryTTS server running
License
My own code is Apache-2.0 licensed unless otherwise noted in the script’s copyright headers.
Metadata
Release files for py-marytts 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py-marytts-0.1.4.tar.gz | 4.1 kB | Without provenance | Details for py-marytts-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_marytts-0.1.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for py_marytts-0.1.4-py2.py3-none-any.whl |
Total release size: 10.1 kB
Release files / py-marytts-0.1.4.tar.gz
| Download URL | py-marytts-0.1.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17a5211b38b0005747c1cab69190604a80a359ce7f779de915594b2816991ec8
|
|
BLAKE2b-256 checksum How to use checksums |
cd3f0ea997336367ea204b2e48cb6bc5cd60c602c3f93e422cc4cee5e8ee10b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / py_marytts-0.1.4-py2.py3-none-any.whl
| Download URL | py_marytts-0.1.4-py2.py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dbe058d38acb4751b3a25c8ab8940723ae3fd8ac82f9a6ee3cf0f906338d2258
|
|
BLAKE2b-256 checksum How to use checksums |
6a97b01d0eaf74b18cce1cbf67f9b1939d7f248e20486563eab37e4128edfee4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for py-marytts 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.