mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-10-26 01:54:36 +08:00
`voice/baidu` and `voice/custom` were the only providers calling `requests.*` without a timeout. A stalled service leaves such a request waiting forever: the socket stays open, nothing is raised and nothing is logged, so the turn never finishes and the user never gets a reply. Baidu's long-text synthesis already caps its polling loop at 100 rounds, but the unbounded POST inside that loop means the loop can never advance past a hang — the cap never gets a chance to fire. Use the same (connect, read) shape as the other providers: (5, 60) for baidu, matching openai/zhipuai, and (5, 120) for custom, whose ASR upload and TTS synthesis are the two long endpoints mimo and linkai already allow 120s for.