Python-Speechd?

PyG*_*eek 5 python text-to-speech orca 12.10 python-2.7

我刚刚升级到 Ubuntu 12.10,正在玩一些 Python 代码。在早期版本中,我曾经能够做到:

import speechd
Run Code Online (Sandbox Code Playgroud)

现在我知道该模块不存在。当我尝试安装 python-speechd 时,它还告诉我以下内容:

Package python-speechd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsolete, or is only available from another source

E: Package 'python-speechd' has no installation candidate.
Run Code Online (Sandbox Code Playgroud)

我该怎么办?如果可以,我想继续使用语音调度程序。https://live.gnome.org/Orca/SpeechDispatcher说我应该尝试安装 python-speechd,但它不起作用。预先感谢您 - 我到处搜索,但找不到任何东西。

编辑: 我做了一些挖掘,这似乎是 Python 2.7 的问题,因为安装了 python3-speechd 但没有安装 python-speechd。以下工作:

python3 -c "import speechd"
Run Code Online (Sandbox Code Playgroud)

但这不是(找不到模块语音):

python2.7 -c "import speechd"
Run Code Online (Sandbox Code Playgroud)

将它与 Python 2.7 一起使用会很棒。

第二次编辑: 我尝试从这里安装 python-speechd:https ://launchpad.net/ubuntu/quantal/i386/python-speechd/0.7.1-6ubuntu3 但它说它的安装与 python3-speechd 冲突。

Jen*_*son 4

作为OrcaUbuntu迁移到 Python 3 的一部分,Python 语音调度程序绑定已迁移到 Python 3并且不再支持 Python 2。从技术上讲,这些绑定很容易支持 Python 2 并打包 Python 2绑定,但尚未完成。

你能为这个做什么?

  • 我建议你使用Python 3,这是前进的方向,也是将来能够继续使用Python语音的唯一方法。
  • 您可以尝试手动安装Speech Dispatcher 0.7.1:它是带有 Python 2 绑定的最后一个版本。请参阅安装文件。
  • 另一个解决方案是将 Ubuntu 降级到 12.04,这是一个坏主意,但可以通过一些努力来完成:请参阅询问 Ubuntu 关于降级的问题