pyttsx3's official website address on pypi is https://pypi.org/project/pyttsx3/
The documentation address of the pyttsx3 project: https://pyttsx3.readthedocs.io/en/latest/
pyttsx3 is a text-to-speech library in Python that, unlike other libraries, works offline and is compatible with both Python 2 and 3.
The sample code is as follows:
import pyttsx3engine = pyttsx3.init()"""Language rate"""rate = engine.getProperty('rate') # Get the current speech rate, the default is 200print (rate) # print the current speech rateengine.setProperty('rate', 100) # Set the new voice rate"""Volume level"""volume = engine.getProperty('volume') # Get the current volume level (min=0, max=1), the default is 1.0print (volume) # print the current volume levelengine.setProperty('volume',1) # set the new current