public function audioSplicing()
{
$content = '';
$sound_duration = 0;
$content = explode(',',$content);
$config = [
'accessKey' => 'oRCqsxUSL9ix10Z***',
'secretKey' => 'VINTNq3r***',
'bucket' => 'huyanluanyuapp',
'cdnurl' => 'http://huyanluanyuapp.qiniu.***.cn'
];
if(count($content) > 1){
$auth = new Qiniu\Auth($config['accessKey'], $config['secretKey']);
$obj = new \Qiniu\Processing\PersistentFop($auth);
$image_key = ltrim(str_replace($config['cdnurl'],'',$content[0]), '/');
$fops = 'avconcat/1/format/mp3';
foreach ($content as $key => $audio){
$sound_avinfo = json_decode(file_get_contents($audio. '?avinfo'), true);
$sound_duration += $sound_avinfo['format']['duration'];
if($key > 0){
$fops .= '/'.\Qiniu\base64_urlSafeEncode($audio);
}
}
$fops .= '|saveas/'.\Qiniu\entry($config['bucket'], $image_key);
list($id, $err) = $obj->execute($config['bucket'],$image_key,$fops,null,null,1);
}else{
$sound_avinfo = json_decode(file_get_contents($content[0] . '?avinfo'), true);
$sound_duration += $sound_avinfo['format']['duration'];
}
$content = str_replace($config['cdnurl'],'',$content[0]).'?v='.mt_rand(100000,999999);
}