更新iat语音

This commit is contained in:
yaooo 2023-10-11 18:31:08 +08:00
parent ad8d0f78c8
commit 21d166ab19

View File

@ -147,6 +147,15 @@ class XunFeiController extends BaseApiController
$last_file = substr($savename, -36); $last_file = substr($savename, -36);
$copyFile = app()->getRootPath() . '/public/uploads/iat/' . $last_file; $copyFile = app()->getRootPath() . '/public/uploads/iat/' . $last_file;
copy($file, $copyFile); copy($file, $copyFile);
// $last_file = 'a1fcdd96c7967b48add17b52ab456368.mp3';
$curl_url = "https://dev.app.tword.cn/ffmpeg.php?file={$last_file}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "//www.jb51.cc");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_exec($ch);
curl_close($ch);
$file = "https://dev.app.tword.cn/iat/" . $last_file . ".pcm"; $file = "https://dev.app.tword.cn/iat/" . $last_file . ".pcm";
// $ext = pathinfo($file, PATHINFO_EXTENSION); // $ext = pathinfo($file, PATHINFO_EXTENSION);
$ext = "pcm"; $ext = "pcm";