From 0c1373229eb0aba13f28c712c706251a92246cce Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 10 Oct 2023 14:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/XunFeiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/controller/XunFeiController.php b/app/api/controller/XunFeiController.php index 604d62b51..e7c120265 100644 --- a/app/api/controller/XunFeiController.php +++ b/app/api/controller/XunFeiController.php @@ -247,7 +247,7 @@ class XunFeiController extends BaseApiController } $date = date('YmdHis', time()); $file_name = $date . mt_rand(1000, 9999) . '.mp3'; - $audioFile = app()->getRootPath() . '/runtime/storage/audio/' . date('Ymd') . '/' . $file_name; + $audioFile = app()->getRootPath() . '/public/uploads/audio/' . date('Ymd') . '/' . $file_name; $business = [ 'aue' => 'lame', //mp3格式 'vcn' => 'xiaoyan', //发音人 @@ -263,7 +263,7 @@ class XunFeiController extends BaseApiController } catch (\Exception $e) { return $this->fail($e->getMessage().''); } - return $this->data(['audio_file' => $audioFile]); + return $this->data(['audio_file' => '/uploads/audio/' . date('Ymd') . '/' . $file_name]); } }