仓鼠二号 发表于 2020-4-23 15:20:27

有人使用过pyttsx3库吗

pyttsx3 能将文字转换成语音朗读出来, 有没有什么办法存下这个音频文件 pyttsx3库里没有找到或者其他离线的文字转语音的方法 要能存下音频文件

Hello. 发表于 2020-4-23 15:22:07

你说的啥,没懂

zltzlt 发表于 2020-4-23 17:55:58

https://fishc.com.cn/thread-156688-1-1.html

仓鼠二号 发表于 2020-4-23 18:10:12

zltzlt 发表于 2020-4-23 17:55
https://fishc.com.cn/thread-156688-1-1.html

额 我想要一种离线的方法   也十分感谢{:5_92:}

zltzlt 发表于 2020-4-23 18:12:55

仓鼠二号 发表于 2020-4-23 18:10
额 我想要一种离线的方法   也十分感谢

Engine 有个叫 save_to_file 的方法,貌似能实现需求,你试试,下面是它的文档

Help on method save_to_file in module pyttsx3.engine:

save_to_file(text, filename, name=None) method of pyttsx3.engine.Engine instance
    Adds an utterance to speak to the event queue.
   
    @param text: Text to sepak
    @type text: unicode
    @param filename: the name of file to save.
    @param name: Name to associate with this utterance. Included in
      notifications about this utterance.
    @type name: str

仓鼠二号 发表于 2020-4-23 22:09:52

zltzlt 发表于 2020-4-23 18:12
Engine 有个叫 save_to_file 的方法,貌似能实现需求,你试试,下面是它的文档

{:5_107:}试了下没任何反应 不挣扎了
页: [1]
查看完整版本: 有人使用过pyttsx3库吗