Coder Social home page Coder Social logo

pyttsx4's Introduction

Downloads Downloads

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:

  1. add memory support for sapi5
  2. add memory support for espeak(espeak is not tested). eg:
b = BytesIO()
engine.save_to_file('i am Hello World', b)
engine.runAndWait()
  1. fix VoiceAge key error

  2. fix for sapi save_to_file when it run on machine without outputsream device.

  3. fix save_to_file does not work on mac os ventura error. --3.0.6

  4. add pitch support for sapi5(not tested yet). --3.0.8

  5. fix nsss engine: Import super from objc to fix AttributeError by @matt-oakes.

  6. add tts support: deep-learning text to voice backend:

just say:

engine = pyttsx4.init('coqui_ai_tts')
engine.say('this is an english text to voice test.')
engine.runAndWait()

cloning someones voice:

engine = pyttsx4.init('coqui_ai_tts')
engine.setProperty('speaker_wav', './someones_voice.wav')

engine.say('this is an english text to voice test.')
engine.runAndWait()

demo output:

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:Jiangshan00001#2

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 :

pyttsx4's People

Contributors

akchhayalok avatar benoit-pierre avatar cczhong11 avatar cxong avatar dax-dot-gay avatar ekalosak avatar erikboesen avatar fourjr avatar hobson avatar hoefling avatar hunta88 avatar jiangshan00001 avatar kj7rrv avatar matt-oakes avatar monsieurvishal avatar nateshmbhat avatar tochaim avatar totallyaprogrammer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.