Some time back, we've talked about how to build a speech recognition system in Python. Now let's look in to the other end of it: how to make a Python program that talks. More specifically, let's looks at building a text-to-speech system.
There are several libraries out there that would let you build a text-to-speech model: gTTS, tts_watson, Pyttsx, etc. But today, we'll be talking about using PyWin32 on Windows 10.
Windows 10 has a built-in speech engine, and you can access it through the PyWin32 library. As it uses the built-in system, it's quite efficient than other TTS methods on Windows, and does not require any external tools to playback the audio.
The PyWin32 library gets installed automatically if you're using Anaconda Python. If it's not installed, you can install it using either `conda install pywin32` or `pip install pywin32`.
Text-to-speech with PyWin32 |