我正在使用 pyttsx 将文本转换为音频,在使用 cx_freeze 编译之前效果很好。但是转成exe后就没有声音了。即使它不会产生错误。我的设置文件如下:
.
.
.
executables = [cx_Freeze.Executable("version2.py", base=base)]
includes = ['pyttsx', 'pyttsx.drivers.sapi5']
packages = ['tkinter']
cx_Freeze.setup(
name = "SpellChcker",
options = {"build_exe": {"packages": packages, 'includes': includes}},
version = "0.01",
description = "Spelling check app",
executables = executables
)