更新 app/controller/IndexController.php
更新
This commit is contained in:
parent
35f4529934
commit
e4dc866a9e
@ -66,8 +66,8 @@ class IndexController
|
||||
if( preg_match($pattern, $text)){
|
||||
$name = time() . rand(1, 100000) . '.mp3';
|
||||
$tts = new TtsClient($this->app_id, $this->api_key, $this->api_secret, $this->ttsConfig);
|
||||
file_put_contents(public_path('tts') . '/' . $name, $tts->request($text)->getBody()->getContents());
|
||||
return json(['code' => 0, 'msg' => 'ok','data'=>['mp3'=>'https://chat.lihaink.cn/tts/' . $name]]);
|
||||
file_put_contents(public_path('ptts') . '/' . $name, $tts->request($text)->getBody()->getContents());
|
||||
return json(['code' => 0, 'msg' => 'ok','data'=>['mp3'=>'https://chat.lihaink.cn/ptts/' . $name]]);
|
||||
}
|
||||
return json(['code' => 0, 'msg' => 'ok']);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user