更新iat语音

This commit is contained in:
yaooo 2023-10-11 18:21:52 +08:00
parent 68c1c3be99
commit 60c4201dad

View File

@ -147,7 +147,9 @@ class XunFeiController extends BaseApiController
$last_file = substr($savename, -36);
$copyFile = app()->getRootPath() . '/public/uploads/iat/' . $last_file;
copy($file, $copyFile);
$ext = pathinfo($file, PATHINFO_EXTENSION);
$file = "https://dev.app.tword.cn/iat/" . $last_file . ".pcm";
// $ext = pathinfo($file, PATHINFO_EXTENSION);
$ext = "pcm";
$extArray = ['mp3', 'pcm'];
if (!in_array($ext, $extArray)) {
return $this->fail('录音格式错误');