idootop / mi-gpt

🏠 将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手。
MIT License
7.86k stars 817 forks source link

当OpenAI回答过长,小爱音箱没有发声 #164

Closed toliuweijing closed 3 months ago

toliuweijing commented 3 months ago

情况 如下图,绿色的短回答成功,但红色的长回答被忽略。已阅https://github.com/idootop/mi-gpt/issues/14#issuecomment-2148771946, 还没找到办法。

image

参数

2024/07/31 02:57:58 Speaker 🐛 环境变量: {
    "npm_config_user_agent": "npm/10.7.0 node/v20.14.0 linux arm64 workspaces/false",
    "NODE_VERSION": "20.14.0",
    "HOSTNAME": "ea520d0c3a78",
    "YARN_VERSION": "1.22.22",
    "npm_node_execpath": "/usr/local/bin/node",
    "SHLVL": "3",
    "npm_config_noproxy": "",
    "OPENAI_BASE_URL": "https://api.moonshot.cn/v1",
    "HOME": "/root",
    "npm_package_json": "/app/package.json",
    "npm_package_engines_node": ">=16",
    "OPENAI_API_KEY": "xxxxxx",
    "npm_config_userconfig": "/root/.npmrc",
    "npm_config_local_prefix": "/app",
    "COLOR": "0",
    "npm_config_prefix": "/usr/local",
    "npm_config_npm_version": "10.7.0",
    "npm_config_cache": "/root/.npm",
    "npm_config_node_gyp": "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
    "PATH": "/app/node_modules/.bin:/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
    "NODE": "/usr/local/bin/node",
    "npm_package_name": "mi-gpt",
    "npm_lifecycle_script": "node ./app.js",
    "OPENAI_MODEL": "moonshot-v1-8k",
    "npm_package_version": "4.1.0",
    "npm_lifecycle_event": "start",
    "npm_config_globalconfig": "/usr/local/etc/npmrc",
    "npm_config_init_module": "/root/.npm-init.js",
    "PWD": "/app",
    "npm_execpath": "/usr/local/lib/node_modules/npm/bin/npm-cli.js",
    "npm_config_global_prefix": "/usr/local",
    "npm_command": "run-script",
    "INIT_CWD": "/app",
    "EDITOR": "vi"
}
2024/07/31 02:57:58 Speaker 🐛 设备信息: {
    "name": "小爱音箱Play增强版",
    "desc": "设备在线 ",
    "model": "xiaomi.wifispeaker.l05c",
    "rom": "1.0.2"
}
toliuweijing commented 3 months ago
2024/07/31 02:57:58 Speaker 🐛 配置参数: {
    "did": "小爱音箱Play增强版",
    "callAIKeywords": [
        "请",
        "你",
        "傻妞"
    ],
    "wakeUpKeywords": [
        "打开",
        "进入",
        "召唤"
    ],
    "exitKeywords": [
        "关闭",
        "退出",
        "再见"
    ],
    "onEnterAI": [
        "你好,我是傻妞,很高兴认识你"
    ],
    "onExitAI": [
        "傻妞已退出"
    ],
    "onAIAsking": [
        "稍等"
    ],
    "onAIReplied": [
        "我说完了",
        "还有其他问题吗"
    ],
    "onAIError": [
        "啊哦,出错了,请稍后再试吧!"
    ],
    "ttsCommand": [
        5,
        3
    ],
    "wakeUpCommand": [
        5,
        1
    ],
    "tts": "xiaoai",                                                                                                                                   "streamResponse": false,
    "exitKeepAliveAfter": 30,
    "checkTTSStatusAfter": 3,
    "checkInterval": 1000,
    "debug": true,
    "enableTrace": false,
    "timeout": 20000
}
idootop commented 3 months ago

有概率如此,跟机型关系很大。小爱 Play 系列的音箱 TTS 有较大概率无响应,与文字长短关系不大。