*****************************************************
pytspeak (Convert Text To Speech for Python)
*****************************************************
``pytspeak`` is a library for text-to-speech conversion in Python.
Installation
************
::
pip install pytspeak
Usage :
************
::
import pytspeak
engine = pytspeak.init()
engine.say("Hello I'm pytspeak library")
engine.runAndWait()
::
import pytspeak
# Initialize the text-to-speech engine
engine = pytspeak.init()
# Adjusting Volume
volume = engine.getProperty('volume') # Get the current volume level (0.0 to 1.0)
print("Current Volume Level:", volume)
engine.setProperty('volume', 0.9) # Set the volume level to 1.0 (maximum)
# Adjusting Speaking Rate
rate = engine.getProperty('rate') # Get the current speaking rate
print("Current Speaking Rate:", rate)
engine.setProperty('rate', 120) # Set a new speaking rate to 125 words per minute
# Selecting Voice
voices = engine.getProperty('voices') # Get details of available voices
# Change the voice to the second voice (female in this case)
engine.setProperty('voice', voices[1].id)
# Text-to-Speech
engine.say("How are you ?")
engine.say('Speaking rate is ' + str(rate))
engine.runAndWait()
# Saving Speech to a File
engine.save_to_file('Good Luck', 'voice.mp3')
engine.runAndWait()
# Cleanup: Stop the text-to-speech engine
engine.stop()
Raw data
{
"_id": null,
"home_page": "https://github.com/nateshmbhat/pytspeak",
"name": "pytspeak",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "text,speach",
"author": "Nine Mbhat",
"author_email": "ninembhat@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/55/c5/2272f3fdcdc609573f2760366260c7d27ce232e7d6f6bff366cd482624dc/pytspeak-3.23.tar.gz",
"platform": null,
"description": "*****************************************************\npytspeak (Convert Text To Speech for Python)\n*****************************************************\n\n``pytspeak`` is a library for text-to-speech conversion in Python.\n\nInstallation\n************\n::\n\n\tpip install pytspeak\n\n\n\nUsage :\n************\n::\n\n import pytspeak\n engine = pytspeak.init()\n engine.say(\"Hello I'm pytspeak library\")\n engine.runAndWait()\n\t\n\t\n\n::\n\n import pytspeak\n\n # Initialize the text-to-speech engine\n engine = pytspeak.init()\n\n # Adjusting Volume\n volume = engine.getProperty('volume') # Get the current volume level (0.0 to 1.0)\n print(\"Current Volume Level:\", volume)\n engine.setProperty('volume', 0.9) # Set the volume level to 1.0 (maximum)\n\n # Adjusting Speaking Rate\n rate = engine.getProperty('rate') # Get the current speaking rate\n print(\"Current Speaking Rate:\", rate)\n engine.setProperty('rate', 120) # Set a new speaking rate to 125 words per minute\n\n # Selecting Voice\n voices = engine.getProperty('voices') # Get details of available voices\n # Change the voice to the second voice (female in this case)\n engine.setProperty('voice', voices[1].id)\n\n # Text-to-Speech\n engine.say(\"How are you ?\")\n engine.say('Speaking rate is ' + str(rate))\n engine.runAndWait()\n\n # Saving Speech to a File\n engine.save_to_file('Good Luck', 'voice.mp3')\n engine.runAndWait()\n\n # Cleanup: Stop the text-to-speech engine\n engine.stop()",
"bugtrack_url": null,
"license": "",
"summary": "pytspeak is a library for text-to-speech conversion in Python.",
"version": "3.23",
"project_urls": {
"Homepage": "https://github.com/nateshmbhat/pytspeak"
},
"split_keywords": [
"text",
"speach"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "55c52272f3fdcdc609573f2760366260c7d27ce232e7d6f6bff366cd482624dc",
"md5": "fb11ff4b746e571e74504587cf0eba35",
"sha256": "a17ee14fab4172218ccd6799fce8e913d73b02f73e18589ee0af4e12e740293b"
},
"downloads": -1,
"filename": "pytspeak-3.23.tar.gz",
"has_sig": false,
"md5_digest": "fb11ff4b746e571e74504587cf0eba35",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25234,
"upload_time": "2023-09-07T10:39:38",
"upload_time_iso_8601": "2023-09-07T10:39:38.806016Z",
"url": "https://files.pythonhosted.org/packages/55/c5/2272f3fdcdc609573f2760366260c7d27ce232e7d6f6bff366cd482624dc/pytspeak-3.23.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-07 10:39:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nateshmbhat",
"github_project": "pytspeak",
"github_not_found": true,
"lcname": "pytspeak"
}