更新语音
This commit is contained in:
parent
21e524fbdb
commit
1c1668173d
@ -126,13 +126,13 @@ class XunFeiController extends BaseApiController
|
||||
header('X-Accel-Buffering: no');
|
||||
$file = request()->file('audio');
|
||||
if(empty($file)){
|
||||
//return $this->fail('未上传音频文件');
|
||||
return $this->fail('未上传音频文件');
|
||||
}
|
||||
// 上传音频临时文件
|
||||
$savename = \think\facade\Filesystem::putFile('audio', $file);
|
||||
$file = app()->getRootPath() . '/runtime/storage/' . $savename;
|
||||
if (!file_exists($file)) {
|
||||
//return $this->fail('未上传音频文件');
|
||||
return $this->fail('未上传音频文件');
|
||||
}
|
||||
// $file = "https://lihai001.oss-cn-chengdu.aliyuncs.com/media/iat_mp3_16k.mp3";
|
||||
$audioFile = fopen($file, 'rb');
|
||||
|
Loading…
x
Reference in New Issue
Block a user