API 详情
北京时间 -- 返回首页 登录

API Details

百度tts合成

文字转语音音频合成接口 音色列表;https://www.tiax.pw/API/音色2.txt

状态
正常 GET
总调用 667
添加时间 2026-05-18
最后更新 2026-06-06

计费信息

Pricing
免费

此接口完全免费

无需账户余额即可调用,仅需有效密钥

请求地址

Endpoint

正式地址

https://www.tiax.pw/API/bdyy.php

示例地址

https://www.tiax.pw/API/bdyy.php?text=要合成的文本&voice/per=id或者名称代号&voice_type=音库类型:basic(基础), high(精品), premium(臻品)&speed=语速 0-9&pitch=音调 0-9&volume=音量 0-9&format=音频格式:mp3 或 pcm&return_type=返回类型:url(返回可访问的 URL)或 base64(返回 base64 编码&apikey=你的key

请求参数

Parameters
参数名类型必填说明
text string 可选 要合成的文本
voice string 可选 id或者名称代号
per string 可选 id或者名称代号
voice_type string 可选 音库类型:basic(基础), high(精品), premium(臻品)
speed string 可选 语速 0-9
pitch string 可选 音调 0-9
volume string 可选 音量 0-9
format string 可选 音频格式:mp3 或 pcm
return_type string 可选 返回类型:url(返回可访问的 URL)或 base64(返回 base64 编码
apikey string 可选 你的key

返回示例

Response
返回MP3或者pcm文件

在线测试

Tester

返回结果

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

调用示例

Code Examples
<?php
$url = 'https://www.tiax.pw/API/bdyy.php';
$params = [
    'text' => 'YOUR_VALUE',
    'voice' => 'YOUR_VALUE',
    'per' => 'YOUR_VALUE',
    'voice_type' => 'YOUR_VALUE',
    'speed' => 'YOUR_VALUE',
    'pitch' => 'YOUR_VALUE',
    'volume' => 'YOUR_VALUE',
    'format' => 'YOUR_VALUE',
    'return_type' => '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/bdyy.php"
params = {
    'text': 'YOUR_VALUE',
    'voice': 'YOUR_VALUE',
    'per': 'YOUR_VALUE',
    'voice_type': 'YOUR_VALUE',
    'speed': 'YOUR_VALUE',
    'pitch': 'YOUR_VALUE',
    'volume': 'YOUR_VALUE',
    'format': 'YOUR_VALUE',
    'return_type': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
}

response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://www.tiax.pw/API/bdyy.php');
const params = {
    'text': 'YOUR_VALUE',
    'voice': 'YOUR_VALUE',
    'per': 'YOUR_VALUE',
    'voice_type': 'YOUR_VALUE',
    'speed': 'YOUR_VALUE',
    'pitch': 'YOUR_VALUE',
    'volume': 'YOUR_VALUE',
    'format': 'YOUR_VALUE',
    'return_type': '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/bdyy.php?text=YOUR_VALUE&voice=YOUR_VALUE&per=YOUR_VALUE&voice_type=YOUR_VALUE&speed=YOUR_VALUE&pitch=YOUR_VALUE&volume=YOUR_VALUE&format=YOUR_VALUE&return_type=YOUR_VALUE&apikey=YOUR_VALUE"

状态码说明

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