Files
chatgpt-on-wechat/voice/custom
c020627 9688b5c4e9 fix(voice): bound every outbound request so a stalled provider cannot hang the turn
`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.
2026-09-27 22:09:31 +08:00
..