From 844d431902066769d720cf73e279b9b24669daa6 Mon Sep 17 00:00:00 2001 From: Fantasy Date: Sat, 1 Jul 2023 11:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paddlespeech/server/utils/audio_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddlespeech/server/utils/audio_handler.py b/paddlespeech/server/utils/audio_handler.py index 4df651337..2eb3547f1 100644 --- a/paddlespeech/server/utils/audio_handler.py +++ b/paddlespeech/server/utils/audio_handler.py @@ -476,9 +476,9 @@ class TTSHttpHandler: html = requests.post(self.url, json.dumps(params), stream=True) # 3. Process the received response - for chunk in html.iter_content(chunk_size=None): + for line in html.iter_lines(): receive_time_list.append(time.time()) - audio = base64.b64decode(chunk) # bytes + audio = base64.b64decode(line) # bytes if first_flag: first_response = time.time() - st first_flag = 0