更新语音

This commit is contained in:
yaooo 2023-10-10 14:23:19 +08:00
parent 0c1373229e
commit 7ab4f85bf5

@ -247,7 +247,11 @@ class XunFeiController extends BaseApiController
}
$date = date('YmdHis', time());
$file_name = $date . mt_rand(1000, 9999) . '.mp3';
$audioFile = app()->getRootPath() . '/public/uploads/audio/' . date('Ymd') . '/' . $file_name;
$dir = app()->getRootPath() . '/public/uploads/audio/' . date('Ymd');
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
$audioFile = $dir . '/' . $file_name;
$business = [
'aue' => 'lame', //mp3格式
'vcn' => 'xiaoyan', //发音人