How to Text to Speech with Python Using win32com

In this tutorial you will learn how to use win32com to speak the text.

Before the tutorial you should install the win32com

Notice: If you haven’t install win32com on your computer, please search “how to install win32com” first. Then read this tutorial.

import win32com.client
speaker = win32com.client.Dispatch("SAPI.SpVoice")
while 1:
print('Enter the sentence')
s = input( ) #You can type in 中文 or English

Written by

Machine Learning / Deep Learning / Python / Flutter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store