text-to-speech - Linux > Python > TTS、STT 和语音识别

标签 text-to-speech python-2.6 voice-recognition speech-to-text

文字转语音

我一直在尝试在 windows 和 Linux 环境中运行 pyttsx...

Linux 环境:

import pyttsx
engine = pyttsx.init()

python 在执行完第一行后就挂了。 我已通过在交互式 shell 提示符下运行这两行来验证上述声明。

windows环境:

import pyttsx
engine = pyttsx.init()
engine.say('Sally sells seashells by the seashore.')
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()

完美运行,并在安装后提供所需的输出 pyttsx 1.0 win32.exe ( from here ) 和 pywin 用于我的 windows ( from here )

所以实际上在 Linux 版本中我实际上缺乏什么???

语音转文本和语音再殖民

那么,pyttsx 可以完成这两项任务吗?如果没有,请推荐一些高效的库..

最佳答案

在 Windows 中,pyttsx 使用 sapi5 驱动程序。

在 Linux 中,pyttsx 使用 espeak 驱动程序。

您的 Linux 系统上安装了什么版本的 espeak?

espeak 和 pulseaudio 不能一起玩。

如果您的系统启用了 pulseaudio,请尝试禁用它,如果这不能防止挂起,请尝试降级或升级您的 espeak 版本,因为这已经解决了其他用户问题(崩溃而不是挂起)。

pyttsx 只做文字转语音。

替代解决方案包括

关于text-to-speech - Linux > Python > TTS、STT 和语音识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6383918/

相关文章:

python - 不能 pip microsoft azure-cognitiveservices-speech?

python - 音乐播放器播放列表

python - Python2.6语法错误

ios - 如何从 Apple 键盘听写中删除 TextView 中的蓝色虚线建议下划线?

Flutter、Dart 将句子每1个字符拆分为2个字符大小,用于flutter自定义tts项目

android - Android TexttoSpeech覆盖其他声音

Python : Ensure string is exactly in A. B.C 格式 ..(两个点分隔 3 个字符串)

c# - 如何使用 Edge.js 模块创建和重用实例变量?

java - 如何在tts说话时停止语音识别?

android - 文字转语音 (TTS)