百度TTS文本转音频-API接口
正常 点数计费1点/次
接口信息
总调用次数: 0
所属分类: 工具
请求方式: GET
响应格式: JSON
添加时间: 2026-05-24
更新时间: 2026-06-07
接口描述: 将文本内容内转成生成音频
请求信息
请求地址
https://api.key5.site/API/audio/baidu/index.php
示例地址
https://api.key5.site/API/audio/baidu/index.php?text=墨白API
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 此接口无需请求参数 | |||
返回示例
// 基础
'0' => '度小美(标准女声)',
'1' => '度小宇(标准男声)',
'3' => '度逍遥(磁性男声)',
'4' => '度丫丫(可爱童声)',
// 精品
'5' => '度小娇(情感女声)',
'103' => '度米朵(甜美女声)',
'106' => '度博文(成熟男声)',
'110' => '度小童(活泼童声)',
'111' => '度小萌(萌系女声)',
'5003' => '度逍遥精品(磁性大叔)',
'5118' => '度小鹿(温柔女声)',
'5977' => '台媒女声',
// 臻品
'4003' => '度逍遥',
'4007' => '度小台',
'4100' => '度小雯',
'4103' => '度米朵',
'4105' => '度灵儿',
'4106' => '度博文',
'4115' => '度小贤',
'4117' => '度小乔',
'4119' => '度小鹿',
'4129' => '度小彦',
'4132' => '度阿闽',
'4134' => '度阿锦',
'4139' => '度小蓉',
'4140' => '度小新',
'4143' => '度清风',
'4144' => '度姗姗',
'4149' => '度星河',
'4150' => '度湘玉',
'4172' => '度筱林',
'4189' => '度涵竹',
'4193' => '度泽言',
'4194' => '度嫣然',
'4195' => '度怀安',
'4196' => '度清影',
'4197' => '度沁遥',
'4206' => '度博文',
'4226' => '南方',
'4254' => '度小清',
'4257' => '四川小哥',
'4278' => '度小贝',
// 大模型(粤语)
'20100' => '度小粤',
'20101' => '度晓芸',
状态码说明
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。 |
| 404 | 请求的资源未找到。请检查您的请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
调用示例
<?php
$url = 'https://api.key5.site/API/audio/baidu/index.php';
$params = [
];
$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://api.key5.site/API/audio/baidu/index.php"
params = {
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.key5.site/API/audio/baidu/index.php');
const params = {
};
Object.keys(params).forEach(key => {
url.searchParams.append(key, params[key]);
});
fetch(url)
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl "https://api.key5.site/API/audio/baidu/index.php"