From 09ae2194d2384cde7b05436ad80bcd486abd316b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 13 Oct 2023 18:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Pusher.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/Pusher.php b/app/Pusher.php index bbc8f45..df72a65 100644 --- a/app/Pusher.php +++ b/app/Pusher.php @@ -73,14 +73,14 @@ class Pusher if ($status != 2) { if ($tts_type == 1) { if (count($arr) == 2) { - $resp['payload']['choices']['tts_text'] = $text.$arr[0]; + $resp['payload']['choices']['tts_text'] = $text . $arr[0]; unset($arr[0]); - if(count($arr)>0){ + if (count($arr) > 0) { foreach ($arr as $k => $v) { - $text .=$v; + $text .= $v; } - }else{ - $text =''; + } else { + $text = ''; } $response = json_encode($resp, true); @@ -92,11 +92,9 @@ class Pusher } $connection->send($response); } else { - if (strlen($text) > 1) { - $resp['payload']['choices']['tts_text'] = $text; - $text = ''; - $response = json_encode($resp, true); - } + $resp['payload']['choices']['tts_text'] = $text; + $text = ''; + $response = json_encode($resp, true); $connection->send($response);