更新
This commit is contained in:
parent
38bc3b9f96
commit
784f01728f
@ -50,10 +50,13 @@ class Tts
|
|||||||
|
|
||||||
if ($data != '') {
|
if ($data != '') {
|
||||||
$arr=explode('。',$data);
|
$arr=explode('。',$data);
|
||||||
|
$count=count($arr);
|
||||||
foreach($arr as $k=>$v){
|
foreach($arr as $k=>$v){
|
||||||
if(strlen($v)>1){
|
if(strlen($v)>1){
|
||||||
$url = $this->tts($v);
|
$url = $this->tts($v);
|
||||||
$resp['mp3'] = $url;
|
$resp['mp3'] = $url;
|
||||||
|
$resp['key'] = $k;
|
||||||
|
$resp['count'] = $count;
|
||||||
$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