Ollama ChatTTS 打造一个你自己的《Her》

作为学了一周Python的中年人,写了个结合 Ollama 和最近非常热门的ChatTTS 的小项目,新手的逻辑能力很差,大家凑合着看。

1. 支持语音和文字输入

2. 通过ChatTTS 的ui api 项目,实现语音回复(因为是本地部署,有点延迟)

GitHub - hkgood/Ollama_ChatTTS: LLM voice chat project by Connect ChatTTS with Local Ollama, 连接本地部署的 Ollama 和 ChatTTS,实现和LLM的语音对话

安装部署:

  1. 安装 Ollama, http://ollama.com
  2. 下载 ChatTTS + Webui 全部分支,以及通过huggingface下载模型文件,https://huggingface.co/2Noise/ChatTTS
  3. GitHub - jianchang512/ChatTTS-ui: 一个简单的本地网页界面,直接使用ChatTTS将文字合成为语音,同时支持对外提供API接口。https://huggingface.co/2Noise/ChatTTS
  4. 下载本分支核心文件,主要是 ollamaChatTTS.py, llmChat.py, voice.py 三个

启动次序:

  1. 先启动 Ollama 本地服务器
  2. 通过 python app.py 启动 ChatTTS Webui
  3. 通过 Streamlit run ollamaChatTTS.py

  • 7
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
假设你想要生成以下的 XML 实例: ```xml <?xml version="1.0" encoding="UTF-8"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> </catalog> ``` 你可以使用以下 HTML 代码生成它: ```html <!DOCTYPE html> <html> <head> <title>XML Example</title> <meta charset="UTF-8"> </head> <body> <?xml version="1.0" encoding="UTF-8"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> </catalog> </body> </html> ``` 请注意,这不是标准的 HTML 代码,因为 XML 和 HTML 是不同的语言,但是你可以在 HTML 中包含 XML 代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值