更新语音

This commit is contained in:
yaooo 2023-10-10 14:46:14 +08:00
parent 7af80243e8
commit bfc4bbbe55

View File

@ -239,6 +239,7 @@ class XunFeiController extends BaseApiController
//语音合成(流式版)
public function tts()
{
halt(request()->domain() . request()->host());
header('X-Accel-Buffering: no');
$ttsHostUrl = "wss://tts-api.xfyun.cn/v2/tts";
$text = request()->param('text');
@ -267,7 +268,7 @@ class XunFeiController extends BaseApiController
} catch (\Exception $e) {
return $this->fail($e->getMessage().'');
}
return $this->data(['audio_file' => 'https://ceshi-worker-task.lihaink.cn/uploads/audio/' . date('Ymd') . '/' . $file_name]);
return $this->data(['audio_file' => request()->domain() . '/uploads/audio/' . date('Ymd') . '/' . $file_name]);
}
}