From a8433d0be42208ecd868899864fac1356b7445d4 Mon Sep 17 00:00:00 2001 From: seven Date: Tue, 25 Mar 2025 20:58:12 +0800 Subject: [PATCH] add --- main/xiaozhi-server/core/providers/tts/linkerai.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/xiaozhi-server/core/providers/tts/linkerai.py b/main/xiaozhi-server/core/providers/tts/linkerai.py index f51ebbf1a..b17877c9d 100644 --- a/main/xiaozhi-server/core/providers/tts/linkerai.py +++ b/main/xiaozhi-server/core/providers/tts/linkerai.py @@ -33,9 +33,9 @@ class TTSProvider(TTSProviderBase): "Authorization": f"Bearer {self.access_token}", "Content-Type": "application/json" } - with open(output_file,'w') as f: - f.write('%s\n'%(json.dumps(params))) - f.write('%s'%(json.dumps(headers))) + with open(output_file,'w',encoding='utf-8') as f: + f.write('%s\n'%(json.dumps(params,ensure_ascii=False))) + f.write('%s'%(json.dumps(headers,ensure_ascii=False))) def yield_data(self,params,headers): response = requests.get(self.api_url, headers=headers, params=params, stream=True)