百度AI文字转语音demo

发布时间:2019-11-13 22:26:45 热度: 414 ℃ 评论数: 0

百度AI文字转语音demo

$wenzi = $_POST['wenzi']; //poet提交

//$wenzi=$_GET['wenzi']; //get提交

require_once "AipSpeech.php"; //引入包 const APP_ID = 'XXX';//你的$APP_ID const API_KEY = 'XXX';//你的$API_KEY const SECRET_KEY = 'XXX';//你的$SECRET_KEY $client = new AipSpeech(APP_ID, API_KEY, SECRET_KEY); $res = $client->synthesis($wenzi, 'zh', 1, array( 'vol' => 5, )); //可设置音调 男女发声等等 $img_encode = base64_encode($res); echo $img_encode;




百度AI,字转语音

吐槽一下
  • 消灭零回复

手机扫码访问