Skip to main content

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.

Release files for pyttsgen 0.1.3

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

Source distribution (sdist)

Source distribution for pyttsgen 0.1.3
File Size Uploaded
pyttsgen-0.1.3.tar.gz 5.9 kB Details

Built distribution (wheel)

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

Total release size: 13.3 kB

Release files / pyttsgen-0.1.3.tar.gz

Download URL pyttsgen-0.1.3.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d5f2f2bf1f113a419389b071c1fd95ea32a1d8e7548e5b3dfc28345fb89909c
BLAKE2b-256 checksum
How to use checksums
69351e06396d30da612e69664c29628e950c227db926fa148c717dd7649a12b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / pyttsgen-0.1.3-py3-none-any.whl

Download URL pyttsgen-0.1.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e052ff4bbbae89e5e5ff89ec503adf1de5e881ac4940eb32057d54454a2187c
BLAKE2b-256 checksum
How to use checksums
42ac9ad3f2409be8b5ce06bd37d2093eab48e39db33a2e76a020798ee05a4960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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