TTSDG
TTSDG, or Text-To-Speech Data Generator, automates the simple-but-frustrating task of generating large amounts of TTS data for tasks like machine learning. TTSDG contains an easy-to-use class that can generate text offline, in large batches, and with control over the system voices that you have installed. TTSDG randomizes volume, speed, and voice of each sample, and prevents duplicates from happening.
TTSDG utilizes pyttsx3 and pydub to generate the audio and convert it into multiple formats. All pydub-supported formats are supported in TTSDG, like WAV, MP3, and AIFF.
Installation
TTSDG is available through pip:
python3 -m pip install ttsdg
Usage
from ttsdg import TTSDG
for word in ["Apple", "Orange", "Banana"]:
print(word)
gen = TTSDG(verbose=True)
gen.volume_range = [.5, 1.0]
gen.wpm_range = [200, 300]
gen.generate(word, 100, out_format="wav")
# A bug in pyttsx3 will cause hangs on generation
# in loops sometimes. del the generator at the end
# of the loop to solve this
del gen
Methods
set_volume_range(low, high, one)- Set low or high volume bounds, or setonefor a specific value.set_wpm_range(low, high, one)- Set low or high speed bounds (in words per minute), or setonefor a specific value.set_voices(voices)- Only mess around with this if you know what you're doing. Sets the list of voices to choose from, relies on what system voices you have installed.set_engine(engine)- Only mess around with this if you know what you're doing. Sets the pyttsx3 Engine object, useful for importing settings if your project already has an engine.get_engine()- Gets the pyttsx3 engine object.generate(text, n, out_format)- Generatesnsamples of the inputtext, saves them to./(text)/(text)_index.(out_format)
Metadata
Release files for ttsdg 1.1.3
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 |
|---|---|---|---|---|
| ttsdg-1.1.3.tar.gz | 240.7 kB | Without provenance | Details for ttsdg-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ttsdg-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for ttsdg-1.1.3-py3-none-any.whl |
Total release size: 245.8 kB
Release files / ttsdg-1.1.3.tar.gz
| Download URL | ttsdg-1.1.3.tar.gz |
|---|---|
| Size | 240.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6ccc4fe134ec910befdb1cb4cc3be5848e8ba65327c0c878b8043484b9431f2
|
|
BLAKE2b-256 checksum How to use checksums |
ac2caa9adba8e5e64bf7d9e84d6ca03ad5c0024bf8d9a1080087460b03074f67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.7
|
Release files / ttsdg-1.1.3-py3-none-any.whl
| Download URL | ttsdg-1.1.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dce578d8f029cd8c46da53d969158ff7a817d88d0d1b42dba157320d33e3ea79
|
|
BLAKE2b-256 checksum How to use checksums |
6cdb2265891287627f7694397b21d7b4aa9f1bfdd53809562631a2164aaeddbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.7
|
Security for ttsdg 1.1.3
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.