python - 我无法在 python 上运行 pyttsx3
问题描述
这是我的代码:
import pyttsx3
speech =pyttsx3.init()
speech.say('hi krishna')
speech.runandwait()
这是错误消息:
KeyError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/pyttsx3/__init__.py in init(driverName, debug)
19 try:
---> 20 eng = _activeEngines[driverName]
21 except KeyError:
15 frames
KeyError: None
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
/usr/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
362
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:
366 self._handle = handle
OSError: libespeak.so.1: cannot open shared object file: No such file or directory
谢谢你
解决方案
推荐阅读
- neo4j - neo4j cypher shell - 内存限制异常
- javascript - 用自定义html替换括号之间的键/值字符串的函数
- c# - C# JObject 动态对象访问值问题
- python - 导入在本地工作,但在使用 pip 安装后不工作
- mybb - MyBB 未知字符
- tensorflow - 在使用 Mobilenet_V1_0.25_224_quant 模型的 Tensorflow Lite Micro 解释器->Invoke() 调用中检测到损坏的堆栈
- javascript - 反应中的 useState() 不会更新数据 - 这是 sort() 问题吗?
- javascript - 如何水平放置等宽的组件?
- collections - CakePHP 集合过滤器返回不同的对象类型?
- php - 从 VBA 到 PHP 的 POST 参数