豆包TTS报错
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 1: invalid continuation byte
ERROR:logger:doubao Traceback (most recent call last): File "D:\AIHuman\LiveTalking\LiveTalkingGitNew\LiveTalking\Miniconda3\lib\site-packages\websockets\legacy\protocol.py", line 963, in transfer_data message = await self.read_message() File "D:\AIHuman\LiveTalking\LiveTalkingGitNew\LiveTalking\Miniconda3\lib\site-packages\websockets\legacy\protocol.py", line 1048, in read_message return frame.data.decode("utf-8") if text else frame.data UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 1: invalid continuation byte
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "D:\AIHuman\LiveTalking\LiveTalkingGitNew\LiveTalking\ttsreal.py", line 581, in doubao_voice res = await ws.recv() File "D:\AIHuman\LiveTalking\LiveTalkingGitNew\LiveTalking\Miniconda3\lib\site-packages\websockets\legacy\protocol.py", line 568, in recv await self.ensure_open() File "D:\AIHuman\LiveTalking\LiveTalkingGitNew\LiveTalking\Miniconda3\lib\site-packages\websockets\legacy\protocol.py", line 948, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: sent 1007 (invalid frame payload data); no close frame received
你是用http连接吗,是的话把ttsreal.py下doubaovoice方法里的submit_request_json["request"]["operation"] = "submit"中的submit改成query