如何导入ybc_speech语音包,来和电脑聊天吧

如何导入ybc_speech包。@author MR.LIU
如果在idle中直接导入ybc_speech这个包,系统直接报错,说没有这个模块。那么需要在cmd中安装ybc_speech。
在cmd中输入pip install ybc-speech,也并不是一帆风顺的。很快就报错了!如下。

如何导入ybc_speech语音包,来和电脑聊天吧

你什么意思,天黑了?简而言之,这并不重要,因为缺少必要的文件配置。很多人私下里开始相信我,说根据网上的教程,结果还是一团糟。事实上,互联网上的方法几乎是一样的。然而,重要的是要注意到,像技术这样的东西更新得很快,你的情况不一定与其他人相同。因此,照搬别人的经验是不好的。

[En]

What do you mean, it’s dark? This is not important, in short, the lack of the necessary file configuration. Many people come to believe me privately, saying that according to the online tutorials, the result is still a mess. In fact, the methods on the Internet are almost the same. However, it is important to note that things like technology are updated quickly, and your situation is not necessarily the same as that of others. Therefore, it is not good to copy the experience of others.

现在让我给你一剂灵丹妙药。

[En]

Now let me give you a panacea.

真正的原因其实就是缺少一个pyaudio,还有一个wordcloud(词云)。

第一步,搞定词云wordcloud问题。没有它的话很难翻译输入的语句及说出对应的语句。在网址https://www.lfd.uci.edu/~gohlke/pythonlibs/中找到对应的wordcloud。一定要和自己的版本号一致!其中cp38代表3.8版本,win32代表Windows系统32位机.

如何导入ybc_speech语音包,来和电脑聊天吧
如何导入ybc_speech语音包,来和电脑聊天吧

下载好wordcloud之后,直接放入你安装python的目录下。

如何导入ybc_speech语音包,来和电脑聊天吧

然后在目中中直接输入cmd,回车。再输入词云就安装成功了!

如何导入ybc_speech语音包,来和电脑聊天吧

接下来搞定pyaudio的问题。还是需要在https://www.lfd.uci.edu/~gohlke/pythonlibs/中找到对应的pyaudio版本。根据自己的python版本来。

如何导入ybc_speech语音包,来和电脑聊天吧
如何导入ybc_speech语音包,来和电脑聊天吧

下载好pyaudio之后,直接放入你安装python的目录下。

如何导入ybc_speech语音包,来和电脑聊天吧

然后在目中中直接输入cmd,回车。再输入安装命令就安装成功了!

如何导入ybc_speech语音包,来和电脑聊天吧

最后回到管理员cmd中,输入命令。整个程序就好了!

如何导入ybc_speech语音包,来和电脑聊天吧

就试一试吧。这真的很有趣。

[En]

Just give it a try. It’s really fun.

如何导入ybc_speech语音包,来和电脑聊天吧

Original: https://blog.csdn.net/YD_CYD_C/article/details/122428982
Author: 你老师_姓刘
Title: 如何导入ybc_speech语音包,来和电脑聊天吧

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/498344/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球