Skip to main content

A developer-friendly, plug-and-play TTS library for Python

Project description

pyttsgen

License: MIT

GitHub: Visit the official source and contribute at https://github.com/reprompts/pyttsgen

dev.to: Read articles and tutorials at https://dev.to/repromptsquest

LinkedIn Group: Join our community at https://www.linkedin.com/groups/14631875/

pyttsgen is a plug-and-play TTS (Text-to-Speech) generator for Python.

It supports:

  • 🔧 Python scripting
  • 🖥️ CLI access
  • 🌐 Streamlit UI

🔌 Installation

pip install pyttsgen
🧪 Usage


1. 🧑‍💻 Python Scripting
python

from pyttsgen import TTS

tts = TTS()
tts.speak_to_file("Hello from Python!", "hello.mp3")
audio_bytes = tts.speak_to_bytes("In-memory audio!")
base64_audio = tts.speak_to_base64("Base64 audio for web!")


2. 💻 CLI

pyttsgen "This is CLI-based speech" --voice en-GB-RyanNeural --output speech.mp3
List all voices

pyttsgen --list-voices
Show usage help

pyttsgen


3. 🌐 UI (Streamlit)

Typing "app" in the CLI
Opens a browser UI to enter text and download audio.




🧾 License
This project is licensed under the MIT License. See the LICENSE file for details.

🤝 Contributing
We welcome open-source contributors and community supporters!
Please read our Contribution Guidelines and submit pull requests.

🛡️ Security
To report security issues or vulnerabilities, email:
repromptsquest@gmail.com

Refer to our Security Policy for more details.

Project details


Download files

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

Source Distribution

pyttsgen-0.1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyttsgen-0.1.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pyttsgen-0.1.3.tar.gz.

File metadata

  • Download URL: pyttsgen-0.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for pyttsgen-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5d5f2f2bf1f113a419389b071c1fd95ea32a1d8e7548e5b3dfc28345fb89909c
MD5 8d1d059c128012c591cf0194228b13cf
BLAKE2b-256 69351e06396d30da612e69664c29628e950c227db926fa148c717dd7649a12b5

See more details on using hashes here.

File details

Details for the file pyttsgen-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyttsgen-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for pyttsgen-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e052ff4bbbae89e5e5ff89ec503adf1de5e881ac4940eb32057d54454a2187c
MD5 f5cc71554d30ab5c906fcb2e8a8cc607
BLAKE2b-256 42ac9ad3f2409be8b5ce06bd37d2093eab48e39db33a2e76a020798ee05a4960

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page