<?php
/**
* 测试语音
*/
require '../common.inc.php';
require DT_ROOT.'/api/speech/AipSpeech.php';
$client = new AipSpeech(APP_ID, API_KEY, SECRET_KEY);
$result = $client->synthesis('您有一条财务审批,请注意查收!', 'zh', 1, array(
'vol' => 5,));
// 识别正确返回语音二进制 错误则返回json 参照下面错误码
if(!is_array($result)){
file_put_contents('audio.mp3', $result);
}
echo ' <embed src="audio.mp3" hidden="false" autostart="true" loop="true" width="0" height="0">';
?>PHP生成语音
最新推荐文章于 2025-01-24 14:09:52 发布
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
HunyuanVideo-Foley
语音合成
HunyuanVideo-Foley是由腾讯混元2025年8月28日宣布开源端到端视频音效生成模型,用户只需输入视频和文字,就能为视频匹配电影级音效
315

被折叠的 条评论
为什么被折叠?



