文字转语音

文字转语音(默认丁真)

接口状态 正常
总调用次数 97
添加时间 2026-03-25
最后更新 2026-03-28

请求地址

正式地址
https://www.tiax.pw/API/yuyin.php
示例地址
https://www.tiax.pw/API/yuyin.php?msg=要转语音的文本&apikey=key

请求参数

参数名类型必填说明
msg string 必填 要转语音的文本
apikey string 必填 key

在线测试

返回结果
点击“立即测试”查看返回结果...

调用示例

<?php
$url = 'https://www.tiax.pw/API/yuyin.php';
$params = [
    'msg' => 'YOUR_VALUE',
    'apikey' => 'YOUR_VALUE',
];
$url .= '?' . http_build_query($params);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
import requests

url = "https://www.tiax.pw/API/yuyin.php"
params = {
    'msg': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
}

response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://www.tiax.pw/API/yuyin.php');
const params = {
    'msg': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
};

Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

fetch(url)
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
curl -X GET "https://www.tiax.pw/API/yuyin.php?msg=YOUR_VALUE&apikey=YOUR_VALUE"

状态码说明

200请求成功
403拒绝访问 (缺少密钥或权限不足)
404资源未找到 (检查 URL)
429请求过于频繁 (触发限流)
500服务器内部错误