我现在想知道如何在 python 中将文本转换为语音。
我在 .NET 中使用
Dim SAPI
Msg = 'Hi this is a test'
SAPI = CreateObject("sapi.spvoice")
SAPI.Speak(Msg)
最佳答案
你可以通过pyttsx来实现模块。它使用默认的 MS 语音识别系统。
import pyttsx
engine = pyttsx.init()
engine.say("Your Message")
engine.runAndWait()
关于python - 如何在python中将文本转换为语音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13759908/