pyttsx3-alt


Namepyttsx3-alt JSON
Version 2.91 PyPI version JSON
download
home_pagehttps://github.com/skibblenybbles/pyttsx3
SummaryText to Speech (TTS) library for Python 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.
upload_time2023-05-22 15:23:51
maintainer
docs_urlNone
authorNatesh M Bhat
requires_python
license
keywords pyttsx ivona pyttsx for python3 tts for python3 pyttsx3 text to speech for python tts text to speech speech speech synthesis offline text to speech offline tts gtts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            *****************************************************
pyttsx3 (offline TTS for Python 3)
*****************************************************

``pyttsx3`` is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.

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


Usage :
************
::

	import pyttsx3
	engine = pyttsx3.init()
	engine.say("I will speak this text")
	engine.runAndWait()
	
	
**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)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/skibblenybbles/pyttsx3",
    "name": "pyttsx3-alt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pyttsx,ivona,pyttsx for python3,TTS for python3,pyttsx3,text to speech for python,tts,text to speech,speech,speech synthesis,offline text to speech,offline tts,gtts",
    "author": "Natesh M Bhat",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "*****************************************************\npyttsx3 (offline TTS for Python 3)\n*****************************************************\n\n``pyttsx3`` is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.\n\nInstallation\n************\n::\n\n\tpip install pyttsx3\n\n\n> If you get installation errors , make sure you first upgrade your wheel version using :  \n`pip install --upgrade wheel`\n\n**Linux installation requirements :**\n#####################################\n\n+ If you are on a linux system and if the voice output is not working , then  : \n\nInstall espeak , ffmpeg and libespeak1 as shown below: \n\n::\n\n\tsudo apt update && sudo apt install espeak ffmpeg libespeak1\n\n\nUsage :\n************\n::\n\n\timport pyttsx3\n\tengine = pyttsx3.init()\n\tengine.say(\"I will speak this text\")\n\tengine.runAndWait()\n\t\n\t\n**Changing Voice , Rate and Volume :**\n\n::\n\n\timport pyttsx3\n\tengine = pyttsx3.init() # object creation\n\n\t\"\"\" RATE\"\"\"\n\trate = engine.getProperty('rate')   # getting details of current speaking rate\n\tprint (rate)                        #printing current voice rate\n\tengine.setProperty('rate', 125)     # setting up new voice rate\n\n\n\t\"\"\"VOLUME\"\"\"\n\tvolume = engine.getProperty('volume')   #getting to know current volume level (min=0 and max=1)\n\tprint (volume)                          #printing current volume level\n\tengine.setProperty('volume',1.0)    # setting up volume level  between 0 and 1\n\n\t\"\"\"VOICE\"\"\"\n\tvoices = engine.getProperty('voices')       #getting details of current voice\n\t#engine.setProperty('voice', voices[0].id)  #changing index, changes voices. o for male\n\tengine.setProperty('voice', voices[1].id)   #changing index, changes voices. 1 for female\n\n\tengine.say(\"Hello World!\")\n\tengine.say('My current speaking rate is ' + str(rate))\n\tengine.runAndWait()\n\tengine.stop()\n\n\t\"\"\"Saving Voice to a file\"\"\"\n\t# On linux make sure that 'espeak' and 'ffmpeg' are installed\n\tengine.save_to_file('Hello World', 'test.mp3')\n\tengine.runAndWait()\n\n\n**Full documentation of the Library**\n#####################################\n\nhttps://pyttsx3.readthedocs.io/en/latest/\n\n\nIncluded TTS engines:\n*********************\n* sapi5\n* nsss\n* espeak\n\nFeel free to wrap another text-to-speech engine for use with ``pyttsx3``.\n\nProject Links:\n**************\n\n* PyPI (https://pypi.python.org)\n* GitHub (https://github.com/nateshmbhat/pyttsx3)\n* Full Documentation (https://pyttsx3.readthedocs.org)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Text to Speech (TTS) library for Python 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.",
    "version": "2.91",
    "project_urls": {
        "Homepage": "https://github.com/skibblenybbles/pyttsx3"
    },
    "split_keywords": [
        "pyttsx",
        "ivona",
        "pyttsx for python3",
        "tts for python3",
        "pyttsx3",
        "text to speech for python",
        "tts",
        "text to speech",
        "speech",
        "speech synthesis",
        "offline text to speech",
        "offline tts",
        "gtts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "124801c675aa89f84fa2be9096776f2b8d2eb66deec61306740402c974662851",
                "md5": "f01de2bef5a57b7d911c1217f77188c8",
                "sha256": "574281c4797659bbb7e01f9f8c6788e4f9a70244e06aea27b6c614389d0d006e"
            },
            "downloads": -1,
            "filename": "pyttsx3_alt-2.91-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f01de2bef5a57b7d911c1217f77188c8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 33249,
            "upload_time": "2023-05-22T15:23:51",
            "upload_time_iso_8601": "2023-05-22T15:23:51.585701Z",
            "url": "https://files.pythonhosted.org/packages/12/48/01c675aa89f84fa2be9096776f2b8d2eb66deec61306740402c974662851/pyttsx3_alt-2.91-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-22 15:23:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "skibblenybbles",
    "github_project": "pyttsx3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyttsx3-alt"
}
        
Elapsed time: 0.09240s