[voice] add google voice support

This commit is contained in:
wanggang
2023-03-07 14:29:59 +08:00
parent f2ae3e2fd8
commit d38fc61043
10 changed files with 132 additions and 7 deletions

View File

@@ -71,6 +71,12 @@ cd chatgpt-on-wechat/
```bash
pip3 install itchat-uos==1.5.0.dev0
pip3 install --upgrade openai
如果使用google的语音识别需要安装speech_recognition和依赖的ffmpeg
pip3 install speech_recognition
--在MacOS中安装ffmpegbrew install ffmpeg
--在Windows中安装ffmpeg下载ffmpeg.exe
--在Linux中安装ffmpegapt-get install ffmpeg
```
注:`itchat-uos`使用指定版本1.5.0.dev0`openai`使用最新版本需高于0.27.0。
@@ -112,7 +118,10 @@ cp config-template.json config.json
+ 默认只要被人 @ 就会触发机器人自动回复;另外群聊天中只要检测到以 "@bot" 开头的内容,同样会自动回复(方便自己触发),这对应配置项 `group_chat_prefix`
+ 可选配置: `group_name_keyword_white_list`配置项支持模糊匹配群名称,`group_chat_keyword`配置项则支持模糊匹配群消息内容用法与上述两个配置项相同。Contributed by [evolay](https://github.com/evolay))
**3.其他配置**
**3.语音识别**
+ 配置`speech_recognition=true`开启语音识别
**4.其他配置**
+ `proxy`:由于目前 `openai` 接口国内无法访问,需配置代理客户端的地址,详情参考 [#351](https://github.com/zhayujie/chatgpt-on-wechat/issues/351)
+ 对于图像生成,在满足个人或群组触发条件外,还需要额外的关键词前缀来触发,对应配置 `image_create_prefix `