English 中文文档
Speech synthesis system based on SAPI.SpVoic
Through this system, text-to-speech can be quickly realized and output to the designated playback device
- windows 7、windows 8、windows 10
- Microsoft Speech SDK 5.1 And Above
- Python3
git clone https://github.com/kajweb/py-win-tts.git
cd py-win-tts
pip install -r requirements.txt
In this repository, two example methods are preset, namely main.py
and simple.py
, you can
-
In
CMD command line
call thesimple.py
filepython simple.py
-
In
CMD command line
call themain.py
filepython main.py
- You can also create a
*.py
file by yourself, create the following content and call the file viapython
.
from PyWinTTS import *;
pwt = pyWinTTS();
pwt.speak( "sentence" );
Without selecting the output device, the default audio output device is output to the system's default audio output device.
Get the current output device
Set output device
Get current announcer
Set announcer
Get current volume
Set volume
start speaking
Because Microsoft Speech SDK
can only run in windows
environment, and this project depends on Microsoft Speech SDK
, so this project only supports windows
system, other systems need to perform SAPI.SpVoic
Compatible processing.
For more help, please go to Wiki page to view the help
MIT