更新
This commit is contained in:
parent
af1b902a25
commit
09ae2194d2
@ -73,14 +73,14 @@ class Pusher
|
|||||||
if ($status != 2) {
|
if ($status != 2) {
|
||||||
if ($tts_type == 1) {
|
if ($tts_type == 1) {
|
||||||
if (count($arr) == 2) {
|
if (count($arr) == 2) {
|
||||||
$resp['payload']['choices']['tts_text'] = $text.$arr[0];
|
$resp['payload']['choices']['tts_text'] = $text . $arr[0];
|
||||||
unset($arr[0]);
|
unset($arr[0]);
|
||||||
if(count($arr)>0){
|
if (count($arr) > 0) {
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
$text .=$v;
|
$text .= $v;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$text ='';
|
$text = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = json_encode($resp, true);
|
$response = json_encode($resp, true);
|
||||||
@ -92,11 +92,9 @@ class Pusher
|
|||||||
}
|
}
|
||||||
$connection->send($response);
|
$connection->send($response);
|
||||||
} else {
|
} else {
|
||||||
if (strlen($text) > 1) {
|
$resp['payload']['choices']['tts_text'] = $text;
|
||||||
$resp['payload']['choices']['tts_text'] = $text;
|
$text = '';
|
||||||
$text = '';
|
$response = json_encode($resp, true);
|
||||||
$response = json_encode($resp, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$connection->send($response);
|
$connection->send($response);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user