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]); } }