
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A versatile and user-friendly Python Text-to-Speech engine with customizable options.
You can install the text-to-speech
module using pip:
pip install text-to-speech
You can use this module to convert text to speech and save it as an audio file. Here's a basic example:
from text_to_speech import save
text = "Hello, World!"
language = "en" # Specify the language (IETF language tag)
output_file = "hello_world.mp3" # Specify the output file (only accepts .mp3)
save(text, language, file=output_file)
Here are the available parameters for the save
function:
Parameter | Description | Default Value |
---|---|---|
text | The text to be converted to speech. | |
language | The language (IETF language tag) to use for speech synthesis. | "en" |
slow | Set to True if you want the text to be read more slowly. | False |
file | The name of the output audio file. Only accepts .mp3 format. | "speech.mp3" |
lang_check | Set to True to check the text for language errors. | False |
You can make the speech slower by setting the slow
parameter to True
:
from text_to_speech import save
text = "This is a slow speech example."
language = "en"
output_file = "slow_speech.mp3"
save(text, language, slow=True, file=output_file)
Contributions to this project are welcome. If you have any improvements or bug fixes, please submit a pull request.
This project is licensed under the MIT License.
FAQs
A versatile and user-friendly Python Text-to-Speech engine
We found that text-to-speech demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.