This commit is contained in:
mkm 2023-10-13 10:14:32 +08:00
parent 784f01728f
commit 417504c0c8

View File

@ -50,17 +50,22 @@ class Tts
if ($data != '') {
$arr=explode('。',$data);
$count=count($arr);
foreach($arr as $k=>$v){
if(strlen($v)>1){
$url = $this->tts($v);
$resp['mp3'] = $url;
$resp['key'] = $k;
$resp['count'] = $count;
$resp['key'] = 'true';
$response = json_encode($resp, true);
$connection->send($response);
return true;
}
}
$resp['mp3'] = '';
$resp['key'] = 'false';
$response = json_encode($resp, true);
$connection->send($response);
return true;
}
}