更新pip3与pyttsx3文字语音转换的实现方法
作者:人类_10086 时间:2021-04-29 13:55:36
我使用的python版本是3.5.2
今天想做个语音读取的小脚本,在网上查了一下发现python里有个pyttsx可以识别文字,
打算通过pip3 install pyttsx安装包,结果报错,
然后试了一下发现不行,去网上查了一下发现pyttsx3才行,
pip3 uninstall pyttsx3
pip3 install pyttsx3成功
这里是参考网页:https://pyttsx3.readthedocs.io/en/latest/ 点击打开链接
代码如下:
# -*- coding: utf-8-*-
import pyttsx3
engine = pyttsx3.init()
engine.say("人类真帅")
engine.runAndWait( )
运行了一下,发现还需要安装依赖包pypiwin32
pip3 install pypiwin32成功
再次运行,它成功的说出了'人类真帅'
来源:https://blog.csdn.net/m0_37102061/article/details/79658867
标签:pip3,pyttsx3,文字,语音
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python中Tkinter复选框Checkbutton是否被选中判断
2023-10-20 16:41:19
![](https://img.aspxhome.com/file/2023/0/118790_0s.png)
Python之多线程爬虫抓取网页图片的示例代码
2021-09-01 18:55:03
![](https://img.aspxhome.com/file/2023/2/121422_0s.png)
python版本的读写锁操作方法
2023-04-29 05:18:57
python文件夹分区的实现方法实例
2022-03-04 02:05:39
![](https://img.aspxhome.com/file/2023/2/97382_0s.png)
使用access数据库时可能用到的数据转换
2008-09-10 12:49:00
list视图方式设计浅析
2008-12-21 16:04:00
![](https://img.aspxhome.com/file/UploadPic/200812/21/01-28s.jpg)
浅谈一下基于Pytorch的可视化工具
2022-12-28 23:08:07
![](https://img.aspxhome.com/file/2023/2/128452_0s.png)
HTML和CSS中的视觉语义
2010-07-09 13:08:00
![](https://img.aspxhome.com/file/UploadPic/20107/9/01-27s.jpg)
Python中内建函数的简单用法说明
2021-09-01 08:19:58
Python读取xlsx数据生成图标代码实例
2022-01-11 11:35:56
![](https://img.aspxhome.com/file/2023/3/69023_0s.png)
python软件都是免费的吗
2022-09-04 03:45:53
Python学习笔记之文件的读写操作实例分析
2023-08-28 04:29:06
如何把一个Excel文件放到ASP页面中去?
2009-11-07 17:54:00
jupyter notebook中美观显示矩阵实例
2023-06-06 18:13:35
![](https://img.aspxhome.com/file/2023/0/87560_0s.jpg)
Python read函数按字节(字符)读取文件的实现
2021-08-20 09:40:48
Django中信号signals的简单使用方法
2023-08-18 08:49:49
UI自动化定位常用实现方法代码示例
2022-09-22 09:47:13
在Python中通过getattr获取对象引用的方法
2023-08-24 23:32:33
Python利用字典破解WIFI密码的方法
2022-08-08 17:18:44
Django的ListView超详细用法(含分页paginate)
2021-02-13 00:53:41