nateshmbhat / Pyttsx3
Licence: gpl-3.0
Offline Text To Speech synthesis for python
Stars: ✭ 637
Programming Languages
Labels
Projects that are alternatives of or similar to Pyttsx3
Cognitive Speech Tts
Microsoft Text-to-Speech API sample code in several languages, part of Cognitive Services.
Stars: ✭ 312 (-51.02%)
Mutual labels: text-to-speech
Brevitas
Brevitas: quantization-aware training in PyTorch
Stars: ✭ 343 (-46.15%)
Mutual labels: text-to-speech
Google Speech V2
💬 Reverse Engineering Google's Speech To Text API (v2)
Stars: ✭ 435 (-31.71%)
Mutual labels: text-to-speech
Alan Sdk Ios
Alan AI iOS SDK adds a voice assistant or chatbot to your app. Supports Swift, Objective-C.
Stars: ✭ 318 (-50.08%)
Mutual labels: text-to-speech
Tts
🤖 💬 Deep learning for Text to Speech (Discussion forum: https://discourse.mozilla.org/c/tts)
Stars: ✭ 5,427 (+751.96%)
Mutual labels: text-to-speech
Tts
🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
Stars: ✭ 305 (-52.12%)
Mutual labels: text-to-speech
Eddiscovery
Captains log and 3d star map for Elite Dangerous
Stars: ✭ 541 (-15.07%)
Mutual labels: text-to-speech
Espeak
eSpeak NG is an open source speech synthesizer that supports 101 languages and accents.
Stars: ✭ 339 (-46.78%)
Mutual labels: text-to-speech
Transformer Tts
A Pytorch Implementation of "Neural Speech Synthesis with Transformer Network"
Stars: ✭ 418 (-34.38%)
Mutual labels: text-to-speech
Vonage Node Sdk
Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 323 (-49.29%)
Mutual labels: text-to-speech
Multilingual text to speech
An implementation of Tacotron 2 that supports multilingual experiments with parameter-sharing, code-switching, and voice cloning.
Stars: ✭ 324 (-49.14%)
Mutual labels: text-to-speech
Xzvoice
Free and open source text-to-speech software
Stars: ✭ 355 (-44.27%)
Mutual labels: text-to-speech
Alan Sdk Flutter
Alan AI Flutter SDK adds a voice assistant or chatbot to your app.
Stars: ✭ 309 (-51.49%)
Mutual labels: text-to-speech
Cboard
AAC communication system with text-to-speech for the browser
Stars: ✭ 437 (-31.4%)
Mutual labels: text-to-speech
Nnmnkwii
Library to build speech synthesis systems designed for easy and fast prototyping.
Stars: ✭ 308 (-51.65%)
Mutual labels: text-to-speech
Voice Builder
An opensource text-to-speech (TTS) voice building tool
Stars: ✭ 362 (-43.17%)
Mutual labels: text-to-speech
Transformertts
🤖💬 Transformer TTS: Implementation of a non-autoregressive Transformer based neural network for text to speech.
Stars: ✭ 617 (-3.14%)
Mutual labels: text-to-speech
Read Aloud
An awesome browser extension that reads aloud webpage content with one click
Stars: ✭ 444 (-30.3%)
Mutual labels: text-to-speech
Alan Sdk Web
Alan AI Web SDK adds a voice assistant or chatbot to your app. Supports React, Angular, Vue, Ember, JavaScript, Electron.
Stars: ✭ 368 (-42.23%)
Mutual labels: text-to-speech
Offline Text To Speech (TTS) converter for Python3
pyttsx3
is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline.
Installation :
pip install pyttsx3
If you get installation errors , make sure you first upgrade your wheel version using :
pip install --upgrade wheel
Linux installation requirements :
-
If you are on a linux system and if the voice output is not working , then :
Install espeak , ffmpeg and libespeak1 as shown below:
sudo apt update && sudo apt install espeak ffmpeg libespeak1
Features :
- ✨Fully OFFLINE text to speech conversion
- 🎈 Choose among different voices installed in your system
- 🎛 Control speed/rate of speech
- 🎚 Tweak Volume
- 📀 Save the speech audio as a file
- ❤️ Simple, powerful, & intuitive API
Usage :
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
Single line usage with speak function with default options
import pyttsx3
pyttsx3.speak("I will speak this text")
Changing Voice , Rate and Volume :
import pyttsx3
engine = pyttsx3.init() # object creation
""" RATE"""
rate = engine.getProperty('rate') # getting details of current speaking rate
print (rate) #printing current voice rate
engine.setProperty('rate', 125) # setting up new voice rate
"""VOLUME"""
volume = engine.getProperty('volume') #getting to know current volume level (min=0 and max=1)
print (volume) #printing current volume level
engine.setProperty('volume',1.0) # setting up volume level between 0 and 1
"""VOICE"""
voices = engine.getProperty('voices') #getting details of current voice
#engine.setProperty('voice', voices[0].id) #changing index, changes voices. o for male
engine.setProperty('voice', voices[1].id) #changing index, changes voices. 1 for female
engine.say("Hello World!")
engine.say('My current speaking rate is ' + str(rate))
engine.runAndWait()
engine.stop()
"""Saving Voice to a file"""
# On linux make sure that 'espeak' and 'ffmpeg' are installed
engine.save_to_file('Hello World', 'test.mp3')
engine.runAndWait()
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)
- GitHub (https://github.com/nateshmbhat/pyttsx3)
- Full Documentation (https://pyttsx3.readthedocs.org)
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].