Text to Speech (TTS) library for Python 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.
Project description
[![Downloads](https://static.pepy.tech/personalized-badge/pyttsx4?period=total&units=international_system&left_color=black&right_color=green&left_text=downloads)](https://pepy.tech/project/pyttsx4) [![Downloads](https://static.pepy.tech/personalized-badge/pyttsx4?period=month&units=international_system&left_color=black&right_color=green&left_text=downloads/month)](https://pepy.tech/project/pyttsx4)
the code is mostly from pyttsx3.
only because the repo pyttsx3 does not update for years and some new feature i want is not here, i cloned this repo.
the changelog:
add memory support for sapi5
add memory support for espeak(espeak is not tested). eg:
` b = BytesIO() engine.save_to_file('i am Hello World', b) engine.runAndWait() `
fix VoiceAge key error
fix for sapi save_to_file when it run on machine without outputsream device.
fix save_to_file does not work on mac os ventura error. –3.0.6
add pitch support for sapi5(not tested yet). –3.0.8
fix nsss engine: Import super from objc to fix AttributeError by matt-oakes.
NOTE:
if save_to_file with BytesIO, there is no wav header in the BytesIO. the format of the bytes data is that 2-bytes = one sample.
if you want to add a header, the format of the data is: 1-channel. 2-bytes of sample width. 22050-framerate.
how to add a wav header in memory:https://github.com/Jiangshan00001/pyttsx4/issues/2
#TBD: add support for TTS.
# how to use:
install: ` pip install pyttsx4 `
use:
` import pyttsx4 engine = pyttsx4.init() `
the other usage is the same as the pyttsx3
### Full documentation of the Library
https://pyttsx3.readthedocs.io/en/latest/
#### Included TTS engines:
sapi5
nsss
espeak
Feel free to wrap another text-to-speech engine for use with pyttsx3.
### Project Links :
PyPI (https://pypi.python.org)
Full Documentation (https://pyttsx3.readthedocs.org)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pyttsx4-3.0.9-py3-none-any.whl
.
File metadata
- Download URL: pyttsx4-3.0.9-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5525bba4b37c6d4248710881a7acfa60927bac6063d3a00214fb65742a1ccf7 |
|
MD5 | 9cc19f2380e504ed6e4a27e190d7df68 |
|
BLAKE2b-256 | 2aee0e644ebf5b6bccad1a1ec24ecdb41ac104667d81bd2b27df29d036edd58a |